"The explosive growth of the GeoWeb and geographic information has made GIS powerful media for the general public to communicate, but perhaps more importantly, GIS have also become media for constructive dialogs and interactions about social issues." - Sui & Goodchild
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
geoinf17:exa1 [2017/12/14 12:57] oertz [3) Cartographie avec CartoCSS] |
geoinf17:exa1 [2018/05/16 10:05] (current) |
||
---|---|---|---|
Line 251: | Line 251: | ||
**(A)** Quelle est la longueur de chaque entité de type ''ST_LineString'' de la table ? - ''ST_Length'' | **(A)** Quelle est la longueur de chaque entité de type ''ST_LineString'' de la table ? - ''ST_Length'' | ||
+ | |||
+ | ---- | ||
+ | <code> | ||
+ | select ST_Length(the_geom), description from montest where ST_GeometryType(the_geom) = 'ST_LineString' | ||
+ | </code> | ||
+ | ---- | ||
**(B)** Quelles sont les coordonnées du point d'intersection entre la route1 et la route2 ? - ''ST_Intersection'' | **(B)** Quelles sont les coordonnées du point d'intersection entre la route1 et la route2 ? - ''ST_Intersection'' | ||
+ | |||
+ | ---- | ||
+ | <code> | ||
+ | select ST_AsText(ST_Intersection(the_geom, (select the_geom from montest where name = 'route2'))) from montest where name = 'route1' | ||
+ | </code> | ||
+ | ---- | ||
**(C)** A quelle distance sont les deux piétons les plus proches ? - ''ST_Distance'' | **(C)** A quelle distance sont les deux piétons les plus proches ? - ''ST_Distance'' | ||
+ | |||
+ | ---- | ||
+ | <code> | ||
+ | select A.name as aname, B.name as bname, ST_Distance(A.the_geom, B.the_geom) as dist from montest A, montest B where A.name <> B.name and A.name like 'pieton%' and B.name like 'pieton%' order by dist limit 1 | ||
+ | </code> | ||
+ | ---- | ||
{{:geoinf17:cartosql.png?nolink|}} | {{:geoinf17:cartosql.png?nolink|}} |