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.

Changeset 21 for trunk


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

traduction de geometries_exercice.rst terminée

File:
1 edited

Legend:

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

    r1 r21  
    11.. _geometries_exercises: 
    22 
    3 Section 9: Geometry Exercises 
    4 ============================= 
    5  
    6 Here's a reminder of all the functions we have seen so far. They should be useful for the exercises! 
    7  
    8  * :command:`sum(expression)` aggregate to return a sum for a set of records 
    9  * :command:`count(expression)` aggregate to return the size of a set of records 
    10  * :command:`ST_GeometryType(geometry)` returns the type of the geometry 
    11  * :command:`ST_NDims(geometry)` returns the number of dimensions of the geometry 
    12  * :command:`ST_SRID(geometry)` returns the spatial reference identifier number of the geometry 
    13  * :command:`ST_X(point)` returns the X ordinate 
    14  * :command:`ST_Y(point)` returns the Y ordinate 
    15  * :command:`ST_Length(linestring)` returns the length of the linestring 
    16  * :command:`ST_StartPoint(geometry)` returns the first coordinate as a point 
    17  * :command:`ST_EndPoint(geometry)` returns the last coordinate as a point 
    18  * :command:`ST_NPoints(geometry)` returns the number of coordinates in the linestring 
    19  * :command:`ST_Area(geometry)` returns the area of the polygons 
    20  * :command:`ST_NRings(geometry)` returns the number of rings (usually 1, more if there are holes) 
    21  * :command:`ST_ExteriorRing(polygon)` returns the outer ring as a linestring 
    22  * :command:`ST_InteriorRingN(polygon, integer)` returns a specified interior ring as a linestring 
    23  * :command:`ST_Perimeter(geometry)` returns the length of all the rings 
    24  * :command:`ST_NumGeometries(multi/geomcollection)` returns the number of parts in the collection 
    25  * :command:`ST_GeometryN(geometry, integer)` returns the specified part of the collection 
    26  * :command:`ST_GeomFromText(text)` returns ``geometry`` 
    27  * :command:`ST_AsText(geometry)` returns WKT ``text`` 
    28  * :command:`ST_AsEWKT(geometry)` returns EWKT ``text`` 
    29  * :command:`ST_GeomFromWKB(bytea)` returns ``geometry`` 
    30  * :command:`ST_AsBinary(geometry)` returns WKB ``bytea`` 
    31  * :command:`ST_AsEWKB(geometry)` returns EWKB ``bytea`` 
    32  * :command:`ST_GeomFromGML(text)` returns ``geometry`` 
    33  * :command:`ST_AsGML(geometry)` returns GML ``text`` 
    34  * :command:`ST_GeomFromKML(text)` returns ``geometry`` 
    35  * :command:`ST_AsKML(geometry)` returns KML ``text`` 
    36  * :command:`ST_AsGeoJSON(geometry)` returns JSON ``text`` 
    37  * :command:`ST_AsSVG(geometry)` returns SVG ``text`` 
    38  
    39 Also remember the tables we have available: 
     3Partie 9 : exercices sur les géométries 
     4====================================== 
     5 
     6Voici un petit rappel de toute les fonction que nous avons jusqu'à présent. Elles devraient être utiles pour les exercices ! 
     7 
     8 * :command:`sum(expression)` agrégation retournant la somme d'un ensemble 
     9 * :command:`count(expression)` agrégation retournant le nombre d'éléments d'un ensemble 
     10 * :command:`ST_GeometryType(geometry)` retourne le type de la géométrie 
     11 * :command:`ST_NDims(geometry)` retourne le  nombre de dimensions 
     12 * :command:`ST_SRID(geometry)` retourne l'identifiant du systÚme de références spatiales 
     13 * :command:`ST_X(point)` retourne la coordonnée X 
     14 * :command:`ST_Y(point)` retourne la coordonnée Y 
     15 * :command:`ST_Length(linestring)` retourne la longueur d'une ligne 
     16 * :command:`ST_StartPoint(geometry)` retourne le premier point d'une ligne 
     17 * :command:`ST_EndPoint(geometry)` retourne le dernier point d'une ligne 
     18 * :command:`ST_NPoints(geometry)` retourne le nombre point d'une ligne 
     19 * :command:`ST_Area(geometry)` retourne l'aire d'un polygone 
     20 * :command:`ST_NRings(geometry)` retourne le nombre de contours (1 ou plus si il y a des trous) 
     21 * :command:`ST_ExteriorRing(polygon)` retourne le contour exterieur (ligne) d'un polygon 
     22 * :command:`ST_InteriorRingN(polygon, integer)` retourne le contour intérieur (ligne) d'un polygone 
     23 * :command:`ST_Perimeter(geometry)` retourne la longueur de tout les contours 
     24 * :command:`ST_NumGeometries(multi/geomcollection)` retourne le nombre de composantes dans une collection 
     25 * :command:`ST_GeometryN(geometry, integer)` retourne la niÚme entité de la collection 
     26 * :command:`ST_GeomFromText(text)` retourne ``geometry`` 
     27 * :command:`ST_AsText(geometry)` retourne WKT ``text`` 
     28 * :command:`ST_AsEWKT(geometry)` retourne EWKT ``text`` 
     29 * :command:`ST_GeomFromWKB(bytea)` retourne ``geometry`` 
     30 * :command:`ST_AsBinary(geometry)` retourne WKB ``bytea`` 
     31 * :command:`ST_AsEWKB(geometry)` retourne EWKB ``bytea`` 
     32 * :command:`ST_GeomFromGML(text)` retourne ``geometry`` 
     33 * :command:`ST_AsGML(geometry)` retourne GML ``text`` 
     34 * :command:`ST_GeomFromKML(text)` retourne ``geometry`` 
     35 * :command:`ST_AsKML(geometry)` retourne KML ``text`` 
     36 * :command:`ST_AsGeoJSON(geometry)` retourne JSON ``text`` 
     37 * :command:`ST_AsSVG(geometry)` retourne SVG ``text`` 
     38 
     39Souvenez-vous aussi des tables qui sont disponibles: 
    4040 
    4141 * ``nyc_census_blocks``  
     
    7272   .. note:: 
    7373 
    74       The area is given in square meters. To get an area in hectares, divide by 10000. To get an area in acres, divide by 4047. 
    75  
    76  * **"What is the area of Manhattan in acres?"** (Hint: both ``nyc_census_blocks`` and ``nyc_neighborhoods`` have a ``boroname`` in them.) 
     74      L'aire est données en metres carrés. Pour obtenir l'aire en hectare, divisez par 10000. Pour obrenir l'aire en acres, divisez par 4047. 
     75 
     76 * **"Quelle est l'aire de Manhattan in acres ?"** (Astuce: ``nyc_census_blocks`` et ``nyc_neighborhoods`` on toutes deux le champ ``boroname``.) 
    7777  
    7878   .. code-block:: sql 
     
    9999 
    100100 
    101  * **"How many census blocks in New York City have a hole in them?"** 
     101 * **"Combien de bloques de la ville de New York ont des trous ?"** 
    102102  
    103103   .. code-block:: sql 
     
    111111     66  
    112112    
    113  * **"What is the total length of streets (in kilometers) in New York City?"** (Hint: The units of measurement of the spatial data are meters, there are 1000 meters in a kilometer.) 
     113 * **"Quel est la longueur totale des rues (en kilomÚtres) dans la ville de New York ?"** (Astuce: l'unité de mesure des données spatiales est le mÚtre, il y a 1000 mÚtres dans un kilomÚtre.) 
    114114   
    115115    .. code-block:: sql 
     
    122122     10418.9047172 
    123123 
    124  * **"How long is 'Columbus Cir' (Columbus Circle)?** 
     124 * **"Quelle est la longueur de 'Columbus Cir' (Columbus Circle) ?** 
    125125  
    126126     .. code-block:: sql 
     
    134134       308.34199 
    135135 
    136  * **"What is the JSON representation of the boundary of the 'West Village'?"** 
     136 * **"Quelle est le contour de 'West Village' au format JSON ?"** 
    137137  
    138138   .. code-block:: sql 
     
    149149          [583263.2776595836,4509242.6260239873]]]]} 
    150150 
    151 The geometry type is "MultiPolygon", interesting! 
     151La géométrie de type "MultiPolygon", interressant ! 
    152152    
    153153       
    154  * **"How many polygons are in the 'West Village' multipolygon?"** 
     154 * **"Combien de polygones sont dans le multi-polygone 'West Village' ?"** 
    155155  
    156156   .. code-block:: sql 
     
    166166   .. note:: 
    167167    
    168       It is not uncommon to find single-element MultiPolygons in spatial tables. Using MultiPolygons allows a table with only one geometry type to store both single- and multi-geometries without using mixed types. 
    169         
    170         
    171  * **"What is the length of streets in New York City, summarized by type?"** 
     168      Il n'est pas rare de trouver des éléments de type multi-polygone ne contenant qu'un seul polygone dans des tables. L'utilisation du type multi-polygone permet d'utiliser une seule table pour y stoquer des géométries simples et multiples sans mélanger les types. 
     169        
     170        
     171 * **"Quel est la longueur des rues de la ville de New York, suivant leur type ?"** 
    172172  
    173173   .. code-block:: sql 
     
    207207   .. note:: 
    208208 
    209       The ``ORDER BY length DESC`` clause sorts the result by length in descending order. The result is that most prevalent types are first in the list. 
     209      La clause ``ORDER BY length DESC`` ordonne le résultats par la valeurs des longueur dans l'ordre décroissant. Le résultat avec la plus grande valeur se retrouve au début la liste de résultats. 
    210210 
    211211  
Note: See TracChangeset for help on using the changeset viewer.