1 2 3 4 5 6 7 8
|
GeoJSON GeometryCollection (Polygon+Point)
:memory: #use in-memory database
SELECT AsGeoJSON(GeomFromText('GEOMETRYCOLLECTION(POLYGON((5 5, 6 5, 6 6, 5 6, 5 5)), POINT(7 8))', 4326), 2, 5);
1 # rows (not including the header row)
1 # columns
AsGeoJSON(GeomFromText('GEOMETRYCOLLECTION(POLYGON((5 5, 6 5, 6 6, 5 6, 5 5)), POINT(7 8))', 4326), 2, 5)
{"type":"GeometryCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[5,5,7,8],"geometries":[{"type":"Point","coordinates":[7,8]},{"type":"Polygon","coordinates":[[[5,5],[6,5],[6,6],[5,6],[5,5]]]}]}:0 # trailing ":0" required to avoid truncation !!!
|