Changes in trunk/workshop-foss4g/joins_exercises.rst [24:1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workshop-foss4g/joins_exercises.rst
r24 r1 1 1 .. _joins_exercises: 2 2 3 Partie 13 : exercice jointures spatial 4 =================================== ====3 Section 13: Spatial Joins Exercises 4 =================================== 5 5 6 Voici un petit rappel de certaines des fonctions vues précédemment. Astuce: elles pourraient être utiles pour les exercices!6 Here's a reminder of some of the functions we have seen. Hint: they should be useful for the exercises! 7 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 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 10 * :command:`ST_Area(geometry)` returns the area of the polygons 11 11 * :command:`ST_AsText(geometry)` returns WKT ``text`` 12 * :command:`ST_Contains(geometry A, geometry B)` ret ourne vrai si la géométrie A contient la géométrieB13 * :command:`ST_Distance(geometry A, geometry B)` ret ourne la distance minimum entre deux géométries14 * :command:`ST_DWithin(geometry A, geometry B, radius)` ret ourne vrai si la A est distante d'au plus radius deB12 * :command:`ST_Contains(geometry A, geometry B)` returns the true if geometry A contains geometry B 13 * :command:`ST_Distance(geometry A, geometry B)` returns the minimum distance between geometry A and geometry B 14 * :command:`ST_DWithin(geometry A, geometry B, radius)` returns the true if geometry A is radius distance or less from geometry B 15 15 * :command:`ST_GeomFromText(text)` returns ``geometry`` 16 16 * :command:`ST_Intersects(geometry A, geometry B)` returns the true if geometry A intersects geometry B 17 17 * :command:`ST_Length(linestring)` returns the length of the linestring 18 * :command:`ST_Touches(geometry A, geometry B)` ret ourne vrai si le contour extérieur de A toucheB19 * :command:`ST_Within(geometry A, geometry B)` ret ourne vrai si A est hors deB20 21 Souvenez-vous des tables à notre disposition : 18 * :command:`ST_Touches(geometry A, geometry B)` returns the true if the boundary of geometry A touches geometry B 19 * :command:`ST_Within(geometry A, geometry B)` returns the true if geometry A is within geometry B 20 21 Also remember the tables we have available: 22 22 23 23 * ``nyc_census_blocks`` … … 37 37 * name, boroname, the_geom 38 38 39 Exerci ces39 Exercises 40 40 --------- 41 41 42 * **" Quelle station de métros se situe dans le quartier 'Little Italy' ? Quelle est l'itinéraire de métros à emprunter?"**42 * **"What subway station is in 'Little Italy'? What subway route is it on?"** 43 43 44 44 .. code-block:: sql … … 56 56 Spring St | 6 57 57 58 * **" Quels sont les quartiers desservis pas le train numéro 6 ?"** (Astuce: la colonnes ``routes`` de la table ``nyc_subway_stations`` on les valeurs suivante 'B,D,6,V' et'C,6')58 * **"What are all the neighborhoods served by the 6-train?"** (Hint: The ``routes`` column in the ``nyc_subway_stations`` table has values like 'B,D,6,V' and 'C,6') 59 59 60 60 .. code-block:: sql … … 88 88 .. note:: 89 89 90 Nous avons utilisé le mot clef ``DISTINCT`` pour supprimer les répétitions dans notre ensemble derésultats où il y avait plus d'une seule station de métros dans le quartier. 91 * **"AprÚs le 11 septembre, le quartier de 'Battery Park' était interdit d'accÚs pendant plusieurs jours. Combien de personnes ont dût être évacués ?"** 90 We used the ``DISTINCT`` keyword to remove duplicate values from our result set where there were more than one subway station in a neighborhood. 91 92 * **"After 9/11, the 'Battery Park' neighborhood was off limits for several days. How many people had to be evacuated?"** 92 93 93 94 .. code-block:: sql … … 103 104 9928 104 105 105 * **" Quelle est la densité de population (personne / km^2) des quartier de 'Upper West Side' et de 'Upper East Side' ?"** (Astuce: il y a 1000000 m^2 dans unkm^2.)106 * **"What are the population density (people / km^2) of the 'Upper West Side' and 'Upper East Side'?"** (Hint: There are 1000000 m^2 in one km^2.) 106 107 107 108 .. code-block:: sql
Note: See TracChangeset
for help on using the changeset viewer.