This refers to the documentation whose main page is : http://postgis.refractions.net/docs/index.html
I've been experimenting with getting geometry in different formats. On this page: http://postgis.refractions.net/docs/ST_AsGeoJSON.html it is possible to get a dictionary like object that includes an object bounding box. I like this. However I am not getting the results set out in the doc. Unless I'm missing something, either the function is wrong, or the docs are wrong. We are discussing the fourth parameter in the call ST_AsGeoJSON() The documentation says that if 1 is set, a bbox is returned, it is not. a bbox is included if 2 is set. Other option values appear to have no effect. (see docs) --- case where options = 1 *euclid=# SELECT id, etype, ST_AsGeoJSON( 1, the_geom, 1, 1 ) FROM gis_geometry WHERE id = 1571; id | etype | st_asgeojson ------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1571 | polyline | {"type":"MultiLineString","coordinates":[[[153.9,883.2],[246.6,812.8],[247.3,807.4],[243.5,801.7],[227.0,776.8],[225.9,771.4],[226.6,766.1],[238.1,711.7],[238.9,707.1],[241.2,702.1],[244.6,695.6],[246.9,692.2],[251.5,688.7],[546.5,472.7]]]} * case where options = 2 *euclid=# SELECT id, etype, ST_AsGeoJSON( 1, the_geom, 1, 2 ) FROM gis_geometry WHERE id = 1571; id | etype | st_asgeojson ------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1571 | polyline | {"type":"MultiLineString","bbox":[153.9,472.7,546.5,883.2],"coordinates":[[[153.9,883.2],[246.6,812.8],[247.3,807.4],[243.5,801.7],[227.0,776.8],[225.9,771.4],[226.6,766.1],[238.1,711.7],[238.9,707.1],[241.2,702.1],[244.6,695.6],[246.9,692.2],[251.5,688.7],[546.5,472.7]]]} (1 row) * -- Cheers! Rick
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
