"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.
Next revision | Previous revision | ||
ogo12:postgis [2012/04/15 21:58] oertz created |
ogo12:postgis [2018/05/15 17:18] (current) |
||
---|---|---|---|
Line 5: | Line 5: | ||
Ne pas oublier l'indispensable [[http://postgis.refractions.net/documentation/manual-1.5/|documentation]] avec son chapitre [[http://postgis.refractions.net/documentation/manual-1.5/reference.html|PostGIS Reference]] | Ne pas oublier l'indispensable [[http://postgis.refractions.net/documentation/manual-1.5/|documentation]] avec son chapitre [[http://postgis.refractions.net/documentation/manual-1.5/reference.html|PostGIS Reference]] | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | Quelques snippets de code QGL : | ||
+ | * Transformation de projection pour un point (longitude X, latitude Y) | ||
+ | <code> | ||
+ | SELECT AsText(ST_Transform(GeometryFromText('POINT(833838 295935)', 21781 ), 4326)); | ||
+ | </code> | ||
+ | * Utilisation de ST_AsGeoJSON pour faciliter le dialogue avec le client web (ex. OpenLayers) | ||
+ | <code> | ||
+ | SELECT genre, ST_AsGeoJSON(geom) FROM test WHERE genre LIKE 'batiment%'; | ||
+ | </code> | ||
+ | |||