Bienvenue sur PostGIS.fr

Bienvenue sur PostGIS.fr , le site de la communauté des utilisateurs francophones de PostGIS.

PostGIS ajoute le support d'objets géographique à la base de données PostgreSQL. En effet, PostGIS "spatialise" le serverur PostgreSQL, ce qui permet de l'utiliser comme une base de données SIG.

Maintenu à jour, en fonction de nos disponibilités et des diverses sorties des outils que nous testons, nous vous proposons l'ensemble de nos travaux publiés en langue française.


Ignore:
Timestamp:
23/09/2011 16:19:36 (13 years ago)
Author:
djay
Message:

traduction de geometries.rst terminée

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/workshop-foss4g/geometries.rst

    r19 r20  
    260260----------------------------- 
    261261 
    262 Within the database, geometries are stored on disk in a format only used by the PostGIS program. In order for external programs to insert and retrieve useful geometries, they need to be converted into a format that other applications can understand. Fortunately, PostGIS supports emitting and consuming geometries in a large number of formats: 
    263  
    264  * Well-known text (:term:`WKT`) 
    265   
    266    * :command:`ST_GeomFromText(text)` returns ``geometry`` 
    267    * :command:`ST_AsText(geometry)` returns ``text`` 
    268    * :command:`ST_AsEWKT(geometry)` returns ``text`` 
    269     
    270  * Well-known binary (:term:`WKB`) 
    271   
    272    * :command:`ST_GeomFromWKB(bytea)` returns ``geometry`` 
    273    * :command:`ST_AsBinary(geometry)` returns ``bytea`` 
    274    * :command:`ST_AsEWKB(geometry)` returns ``bytea`` 
     262Dans la base de données, les géométries sont stoquées dans un format utilisé uniquement par le programme PostGIS. Afin que des programmes externes puissent insérer et récupérer les données utiles, elles ont besoin d'être converties dans un format compris par l'application. Heureusement, PostGIS supporte un grand nombre de formats en entrée et en sortie : 
     263 
     264 * Format texte bien connu (Well-known text :term:`WKT`) 
     265  
     266   * :command:`ST_GeomFromText(text)` retourne une ``geometry`` 
     267   * :command:`ST_AsText(geometry)` retourne le ``texte`` 
     268   * :command:`ST_AsEWKT(geometry)` retourne le ``texte`` 
     269    
     270 * Format binaire bien connu (Well-known binary :term:`WKB`) 
     271  
     272   * :command:`ST_GeomFromWKB(bytea)` retourne ``geometry`` 
     273   * :command:`ST_AsBinary(geometry)` retourne ``bytea`` 
     274   * :command:`ST_AsEWKB(geometry)` retourne ``bytea`` 
    275275    
    276276 * Geographic Mark-up Language (:term:`GML`) 
    277277  
    278    * :command:`ST_GeomFromGML(text)` returns ``geometry`` 
    279    * :command:`ST_AsGML(geometry)` returns ``text`` 
     278   * :command:`ST_GeomFromGML(text)` retourne ``geometry`` 
     279   * :command:`ST_AsGML(geometry)` retourne ``text`` 
    280280    
    281281 * Keyhole Mark-up Language (:term:`KML`) 
    282282  
    283    * :command:`ST_GeomFromKML(text)` returns ``geometry`` 
    284    * :command:`ST_AsKML(geometry)` returns ``text`` 
     283   * :command:`ST_GeomFromKML(text)` retourne ``geometry`` 
     284   * :command:`ST_AsKML(geometry)` retourne ``text`` 
    285285    
    286286 * :term:`GeoJSON` 
    287287  
    288    * :command:`ST_AsGeoJSON(geometry)` returns ``text`` 
     288   * :command:`ST_AsGeoJSON(geometry)` retourne ``text`` 
    289289    
    290290 * Scalable Vector Graphics (:term:`SVG`) 
    291291  
    292    * :command:`ST_AsSVG(geometry)` returns ``text`` 
    293   
    294 The following SQL query shows an example of :term:`WKB` representation (the call to :command:`encode()` is required to convert the binary output into an ASCII form for printing): 
     292   * :command:`ST_AsSVG(geometry)` retourne ``text`` 
     293  
     294La requête SQL suivante montre un exemple de représentation en :term:`WKB` (l'appel à :command:`encode()` est requis pour convertir le format binaire en ASCII pour l'afficher) : 
    295295 
    296296.. code-block:: sql 
     
    302302.. image:: ./geometries/represent-04.png 
    303303 
    304 For the purposes of this workshop we will continue to use WKT to ensure you can read and understand the geometries we're viewing.  However, most actual processes, such as viewing data in a GIS application, transferring data to a web service, or processing data remotely, WKB is the format of choice.   
    305  
    306 Since WKT and WKB were defined in the  :term:`SFSQL` specification, they do not handle 3- or 4-dimensional geometries.  For these cases PostGIS has defined the Extended Well Known Text (EWKT) and Extended Well Known Binary (EWKB) formats.  These provide the same formatting capabilities of WKT and WKB with the added dimensionality. 
    307  
    308 Here is an example of a 3D linestring in WKT: 
     304Dans le reste de ces travaux pratiques, nous utiliserons principalement le format WKT pour que vous puissiez lire et comprendre les géométries que nous voyons. Néanmoins, pour la plupart des traitement actuels, comme la visualisation des données dans une application SIG, le transfert de données à des services web, ou l'exécution distante de traitements, le format WKB est un format de choix. 
     305 
     306Puisque le WKT et le WKB sont définit dans la spécification :term:`SFSQL`, elles ne prennent pas en compte les géométries à 3 ou 4 dimensions. C'est pour cette raison que PostGIS définit les formats Extended Well Known Text (EWKT) et Extended Well Known Binary (EWKB). Cela permet de gérer de façon similaire aux formats WKT et WKB les dimensions ajoutées. 
     307 
     308Voici un exemple de ligne 3D au format WKT : 
    309309 
    310310.. code-block:: sql 
     
    321321.. image:: ./geometries/represent-06.png 
    322322 
    323 In addition to emitters for the various forms (WKT, WKB, GML, KML, JSON, SVG), PostGIS also has consumers for four (WKT, WKB, GML, KML). Most applications use the WKT or WKB geometry creation functions, but the others work too. Here's an example that consumes GML and output JSON: 
     323En plus de pouvoir générer les différents formats en sortie (WKT, WKB, GML, KML, JSON, SVG), PostGIS permet aussi de lire 4 de ces formats (WKT, WKB, GML, KML). La plupart des application utilisent des fonctions créant des géométries à l'aide du format WKT ou WKB, mais les autres marchent aussi. Voici un exemple qui lit du GML et retourne du JSON : 
    324324 
    325325.. code-block:: sql 
     
    329329.. image:: ./geometries/represent-07.png 
    330330 
    331 Function List 
    332 ------------- 
    333  
    334 `Populate_Geometry_Columns <http://postgis.org/docs/Populate_Geometry_Columns.html>`_: Ensures geometry columns have appropriate spatial constraints and exist in the geometry_columns table.. 
    335  
    336 `ST_Area <http://postgis.org/docs/ST_Area.html>`_: Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters. 
    337  
    338 `ST_AsText <http://postgis.org/docs/ST_AsText.html>`_: Returns the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata. 
    339  
    340 `ST_AsBinary <http://postgis.org/docs/ST_AsBinary.html>`_: Returns the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data. 
    341  
    342 `ST_EndPoint <http://postgis.org/docs/ST_EndPoint.html>`_: Returns the last point of a LINESTRING geometry as a POINT. 
    343  
    344 `ST_AsEWKB <http://postgis.org/docs/ST_AsEWKB.html>`_: Returns the Well-Known Binary (WKB) representation of the geometry with SRID meta data. 
    345  
    346 `ST_AsEWKT <http://postgis.org/docs/ST_AsEWKT.html>`_: Returns the Well-Known Text (WKT) representation of the geometry with SRID meta data. 
    347  
    348 `ST_AsGeoJSON <http://postgis.org/docs/ST_AsGeoJSON.html>`_: Returns the geometry as a GeoJSON element. 
    349  
    350 `ST_AsGML <http://postgis.org/docs/ST_AsGML.html>`_: Returns the geometry as a GML version 2 or 3 element. 
    351  
    352 `ST_AsKML <http://postgis.org/docs/ST_AsKML.html>`_: Returns the geometry as a KML element. Several variants. Default version=2, default precision=15. 
    353  
    354 `ST_AsSVG <http://postgis.org/docs/ST_AsSVG.html>`_: Returns a Geometry in SVG path data given a geometry or geography object. 
    355  
    356 `ST_ExteriorRing <http://postgis.org/docs/ST_ExteriorRing.html>`_: Returns a line string representing the exterior ring of the POLYGON geometry. Return NULL if the geometry is not a polygon. Will not work with MULTIPOLYGON 
    357  
    358 `ST_GeometryN <http://postgis.org/docs/ST_GeometryN.html>`_: Returns the 1-based Nth geometry if the geometry is a GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. Otherwise, return NULL. 
    359  
    360 `ST_GeomFromGML <http://postgis.org/docs/ST_GeomFromGML.html>`_: Takes as input GML representation of geometry and outputs a PostGIS geometry object. 
    361  
    362 `ST_GeomFromKML <http://postgis.org/docs/ST_GeomFromKML.html>`_: Takes as input KML representation of geometry and outputs a PostGIS geometry object 
    363  
    364 `ST_GeomFromText <http://postgis.org/docs/ST_GeomFromText.html>`_: Returns a specified ST_Geometry value from Well-Known Text representation (WKT). 
    365  
    366 `ST_GeomFromWKB <http://postgis.org/docs/ST_GeomFromWKB.html>`_: Creates a geometry instance from a Well-Known Binary geometry representation (WKB) and optional SRID. 
    367  
    368 `ST_GeometryType <http://postgis.org/docs/ST_GeometryType.html>`_: Returns the geometry type of the ST_Geometry value. 
    369  
    370 `ST_InteriorRingN <http://postgis.org/docs/ST_InteriorRingN.html>`_: Returns the Nth interior linestring ring of the polygon geometry. Return NULL if the geometry is not a polygon or the given N is out of range. 
    371  
    372 `ST_Length <http://postgis.org/docs/ST_Length.html>`_: Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid) 
    373  
    374 `ST_NDims <http://postgis.org/docs/ST_NDims.html>`_: Returns coordinate dimension of the geometry as a small int. Values are: 2,3 or 4. 
    375  
    376 `ST_NPoints <http://postgis.org/docs/ST_NPoints.html>`_: Returns the number of points (vertexes) in a geometry. 
    377  
    378 `ST_NRings <http://postgis.org/docs/ST_NRings.html>`_: If the geometry is a polygon or multi-polygon returns the number of rings. 
    379  
    380 `ST_NumGeometries <http://postgis.org/docs/ST_NumGeometries.html>`_: If geometry is a GEOMETRYCOLLECTION (or MULTI*) returns the number of geometries, otherwise return NULL. 
    381  
    382 `ST_Perimeter <http://postgis.org/docs/ST_Perimeter.html>`_: Returns the length measurement of the boundary of an ST_Surface or ST_MultiSurface value. (Polygon, Multipolygon) 
    383  
    384 `ST_SRID <http://postgis.org/docs/ST_SRID.html>`_: Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table. 
    385  
    386 `ST_StartPoint <http://postgis.org/docs/ST_StartPoint.html>`_: Returns the first point of a LINESTRING geometry as a POINT. 
    387  
    388 `ST_X <http://postgis.org/docs/ST_X.html>`_: Returns the X coordinate of the point, or NULL if not available. Input must be a point. 
    389  
    390 `ST_Y <http://postgis.org/docs/ST_Y.html>`_: Returns the Y coordinate of the point, or NULL if not available. Input must be a point. 
    391  
    392  
     331Liste des fonctions 
     332------------------- 
     333 
     334`Populate_Geometry_Columns <http://postgis.org/docs/Populate_Geometry_Columns.html>`_: s'assure que les colonnes géométriques on les contraintes spatiales appropriées et sont présentes dans la table  geometry_columns. 
     335 
     336`ST_Area <http://postgis.org/docs/ST_Area.html>`_: retourne l'aire de la surface si c'est un polygon ou un multi-polygone. Pour le type "geometry" l'aire est dans l'unité du SRID. Pour les "geography" l'aire est en mÚtres carrés. 
     337 
     338`ST_AsText <http://postgis.org/docs/ST_AsText.html>`_: retourne la représentation de la geometry/geography au format Well-Known Text (WKT) sans metadonnée correspondant au SRID. 
     339 
     340`ST_AsBinary <http://postgis.org/docs/ST_AsBinary.html>`_: retourne la représentation de la geometry/geography au format Well-Known Binary (WKB) sans metadonnée correspondant u SRID.  
     341 
     342`ST_EndPoint <http://postgis.org/docs/ST_EndPoint.html>`_: retourne le dernier point d'une ligne. 
     343 
     344`ST_AsEWKB <http://postgis.org/docs/ST_AsEWKB.html>`_: retourne la représentation de la geometrie au format Well-Known Binary (WKB) avec la métadonnée SRID. 
     345 
     346`ST_AsEWKT <http://postgis.org/docs/ST_AsEWKT.html>`_: retourne la représentation de la geometrie au format Well-Known Text (WKT) avec la métadonnée SRID. 
     347 
     348`ST_AsGeoJSON <http://postgis.org/docs/ST_AsGeoJSON.html>`_: retourne la géométries au format GeoJSON. 
     349 
     350`ST_AsGML <http://postgis.org/docs/ST_AsGML.html>`_: retourne la géométries au format GML version 2 ou 3. 
     351 
     352`ST_AsKML <http://postgis.org/docs/ST_AsKML.html>`_: retourne la géométries au format KML. Nombreuses variantes. Par défaut : version=2 et precision=15. 
     353 
     354`ST_AsSVG <http://postgis.org/docs/ST_AsSVG.html>`_: retourne la géométries au format SVG. 
     355 
     356`ST_ExteriorRing <http://postgis.org/docs/ST_ExteriorRing.html>`_: retourne une ligne représentant le contour extérieur du polygone. Retourne NULL si la géométrie n'est pas un polygone. Ne fonctionne pas avec les multi-polygone. 
     357 
     358`ST_GeometryN <http://postgis.org/docs/ST_GeometryN.html>`_: retourne niÚme composante si la géométrie est du type GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE ou MULTIPOLYGON. Sinon, retourne NULL. 
     359 
     360`ST_GeomFromGML <http://postgis.org/docs/ST_GeomFromGML.html>`_: prend en entrée une représentation GML de la géométrie et retourne un object PostGIS de type geometry. 
     361 
     362`ST_GeomFromKML <http://postgis.org/docs/ST_GeomFromKML.html>`_: prend en entrée une représentation KML de la géométrie et retourne un object PostGIS de type geometry. 
     363 
     364`ST_GeomFromText <http://postgis.org/docs/ST_GeomFromText.html>`_: retourne une valeur de type ST_Geometry à partir d'une représentation au format Well-Known Text (WKT). 
     365 
     366`ST_GeomFromWKB <http://postgis.org/docs/ST_GeomFromWKB.html>`_: retourne une valeur de type ST_Geometry à partir d'une représenattion au format Well-Known Binary (WKB). 
     367 
     368`ST_GeometryType <http://postgis.org/docs/ST_GeometryType.html>`_: retourne le type de géométrie de la valeur de type ST_Geometry. 
     369 
     370`ST_InteriorRingN <http://postgis.org/docs/ST_InteriorRingN.html>`_: retourne le niÚme contour intérieur d'un polygone. Retourne NULL si la géométrie n'est pas un polygone ou si N est hors des limites. 
     371 
     372`ST_Length <http://postgis.org/docs/ST_Length.html>`_: retourne la longueur en 2-dimensions si c'est une ligne ou une multi-lignes. Les objets de type geometry sont dans l'unité du systÚme de références spatiales et les objet de type geography sont en metres (sphéroïde par défaut). 
     373 
     374`ST_NDims <http://postgis.org/docs/ST_NDims.html>`_: retourne le nombre de dimensions d'une géométrie. Les valeurs possibles sont : 2,3 ou 4. 
     375 
     376`ST_NPoints <http://postgis.org/docs/ST_NPoints.html>`_: retourne le nombre de points dans une géométrie. 
     377 
     378`ST_NRings <http://postgis.org/docs/ST_NRings.html>`_: si la géométrie est un polygone ou un multi-polygone, retourne le nombre de contours. 
     379 
     380`ST_NumGeometries <http://postgis.org/docs/ST_NumGeometries.html>`_: si la géométrie est du type GEOMETRYCOLLECTION (ou MULTI*) retourne le nombre de géométries, sinon retourne NULL. 
     381 
     382`ST_Perimeter <http://postgis.org/docs/ST_Perimeter.html>`_: retourne la longueur du contours extérieur d'une valeur de type ST_Surface ou ST_MultiSurface (polygone, multi-polygone). 
     383 
     384`ST_SRID <http://postgis.org/docs/ST_SRID.html>`_: retourne l'identifiant du systÚme de références spatiales définit dans la table spatial_ref_sys d'un objet de type ST_Geometry. 
     385 
     386`ST_StartPoint <http://postgis.org/docs/ST_StartPoint.html>`_: retourne le premier point d'une ligne. 
     387 
     388`ST_X <http://postgis.org/docs/ST_X.html>`_: retourne la coordonnée X d'un point, ou NULL si non présent. L'argument passé doit être un point. 
     389 
     390`ST_Y <http://postgis.org/docs/ST_Y.html>`_: retourne la coordonnée Y d'un point, ou NULL si non présent. L'argument passé doit être un point. 
     391 
Note: See TracChangeset for help on using the changeset viewer.