"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:56] oertz [2) Ordonnancement de couches] |
geoinf17:exa1 [2018/05/16 10:05] (current) |
||
---|---|---|---|
Line 197: | Line 197: | ||
{{:geoinf17:districts1.png?nolink&200|}} | {{:geoinf17:districts1.png?nolink&200|}} | ||
+ | |||
+ | ---- | ||
+ | <code> | ||
+ | #g4districts98 { | ||
+ | polygon-fill: green; | ||
+ | [uemars2001 > 75] { | ||
+ | polygon-fill: red; | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | ---- | ||
**(B)** Adapter les instructions CartoCSS pour distinguer en plus, les districts qui ont répondu NON à plus de 80%, puis les districts qui ont répondu NON à plus de 85% | **(B)** Adapter les instructions CartoCSS pour distinguer en plus, les districts qui ont répondu NON à plus de 80%, puis les districts qui ont répondu NON à plus de 85% | ||
{{:geoinf17:districts2.png?nolink&200|}} | {{:geoinf17:districts2.png?nolink&200|}} | ||
+ | |||
+ | ---- | ||
+ | <code> | ||
+ | #g4districts98 { | ||
+ | polygon-fill: green; | ||
+ | [uemars2001 > 75] { | ||
+ | polygon-fill: yellow; | ||
+ | } | ||
+ | [uemars2001 > 80] { | ||
+ | polygon-fill: orange; | ||
+ | } | ||
+ | [uemars2001 > 85] { | ||
+ | polygon-fill: red; | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | ---- | ||
===== 4) Un peu de Spatial SQL ===== | ===== 4) Un peu de Spatial SQL ===== | ||
==== Préparation ==== | ==== Préparation ==== | ||
Line 223: | 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|}} |