- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workshop-foss4g/projection_exercises.rst
r30 r1 1 1 .. _projection_exercises: 2 2 3 Partie 16 : Exercices de projection 4 ================================ ===3 Section 16: Projection Exercises 4 ================================ 5 5 6 Voici un rappel de certaines fonctions que nous avons vu. Astuce : elles devraient être utiles pour les exercices ! 7 8 * :command:`sum(expression)` agrégation qui retourn la somme d'un esemble de valeurs 9 * :command:`ST_Length(linestring)` retourne la longueur d'une ligne 10 * :command:`ST_SRID(geometry, srid)` retourne le SRID d'une géométrie 11 * :command:`ST_Transform(geometry, srid)` re-projette des géométries dans un autre systÚme de références spatiales 12 * :command:`ST_GeomFromText(text)` retourne un objet ``geometry`` 13 * :command:`ST_AsText(geometry)` retourne le WKT (``text``) 14 * :command:`ST_AsGML(geometry)` retourne le GML (``text``) 6 Here's a reminder of some of the functions we have seen. Hint: they should be useful for the exercises! 15 7 16 Rappelez-vous les resssources en ligne : 8 * :command:`sum(expression)` aggregate to return a sum for a set of records 9 * :command:`ST_Length(linestring)` returns the length of the linestring 10 * :command:`ST_SRID(geometry, srid)` returns the SRID of the geometry 11 * :command:`ST_Transform(geometry, srid)` converts geometries into different spatial reference systems 12 * :command:`ST_GeomFromText(text)` returns ``geometry`` 13 * :command:`ST_AsText(geometry)` returns WKT ``text`` 14 * :command:`ST_AsGML(geometry)` returns GML ``text`` 15 16 Remember the online resources that are available to you: 17 17 18 18 * http://spatialreference.org 19 19 * http://prj2epsg.org 20 20 21 Et les tables qui sont disponibles: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 est la longueur des rue de New York, mesurée en UTM 18?"**42 * **"What is the length of all streets in New York, as measured in UTM 18?"** 43 43 44 44 .. code-block:: sql … … 51 51 10418904.7172 52 52 53 * **" Quelle est la définition du SRID 2831?"**53 * **"What is the WKT definition of SRID 2831?"** 54 54 55 55 .. code-block:: sql … … 58 58 WHERE SRID = 2831; 59 59 60 O u, via `prj2epsg <http://prj2epsg.org/epsg/2831>`_60 Or, via `prj2epsg <http://prj2epsg.org/epsg/2831>`_ 61 61 62 62 :: … … 87 87 88 88 89 * **" Quelle est la longueur des rue de New York, mesuré en utilisant le SRID 2831?"**89 * **"What is the length of all streets in New York, as measured in SRID 2831?"** 90 90 91 91 .. code-block:: sql … … 100 100 .. note:: 101 101 102 La différence entre les mesure en UTM 18 et en the Stateplane Long Island est de (10421993 - 10418904)/10418904, soit 0.02%. Calculé sur la sphéroïde en utilissant en :ref:`geography` le total des longueurs des route est 10421999, qui est proche de la valeur dans l'autre systÚme de projection (Stateplane Long Island) est précisément calibré pour une petite zone géographique (la ville de New York) alors que le systÚme UTM 18 doit fournir un résultat raisonable pour une zone régionale plus large.102 The difference between the UTM 18 and the Stateplane Long Island measurements is (10421993 - 10418904)/10418904, or 0.02%. Calculated on the spheroid using :ref:`geography` the total street length is 10421999, which is closer to the Stateplane value. This is not surprising, since the Stateplane Long Island projection is precisely calibrated for a very small area (New York City) while UTM 18 has to provide reasonable results for a large regional area. 103 103 104 * **" Quelle est la représentation KML du point de la station de métris 'Broad St'?"**104 * **"What is the KML representation of the point at 'Broad St' subway station?"** 105 105 106 106 .. code-block:: sql … … 114 114 <Point><coordinates>-74.010671468873468,40.707104815584088</coordinates></Point> 115 115 116 H é ! les coordonnées sont géographiques bien que nous n'ayons pas fait appÚle à la fonction :command:`ST_Transform`, pourquoi ? Parce que le standard KML spécifit que toutes les coordonnées *doivent* être en géographiques (en fait, dans le systÚme EPSG:4326), donc la fonction :command:`ST_AsKML` réalise la transformation automatiquement.116 Hey! The coordinates are in geographics even though we didn't call :command:`ST_Transform`, why? Because the KML standard dictates that all coordinates *must* be in geographics (ESPG:4326, in fact) so the :command:`ST_AsKML` function does the transformation automatically.
Note: See TracChangeset
for help on using the changeset viewer.