[postgis-tickets] [PostGIS] #3903: ST_AsGeoJSON not working with LineStringM

PostGIS trac at osgeo.org
Fri Oct 13 14:14:31 PDT 2017


#3903: ST_AsGeoJSON not working with LineStringM
---------------------------------------+---------------------------
 Reporter:  ccsmith                    |      Owner:  pramsey
     Type:  defect                     |     Status:  new
 Priority:  medium                     |  Milestone:  PostGIS 2.4.1
Component:  postgis                    |    Version:  2.1.x
 Keywords:  ST_AsGeoJSON, LineStringM  |
---------------------------------------+---------------------------
 When using ST_AsGeoJSON with a LineStringM or LineStringMZ (and coordinate
 values for the M dimension) geometry there is no resulting coordinate
 output for the M dimension.

 --POSTGIS VERSION
 SELECT PostGIS_full_version();
 "POSTGIS="2.1.8 r13780" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.9.2, 08
 September 2015" GDAL="GDAL 1.11.5, released 2016/07/01" LIBXML="2.9.1"
 LIBJSON="UNKNOWN" RASTER"

 --LINESTRING
 select ST_ASgeojson(ST_GeomFromText('LINESTRING(1 0, 2 0, 4 0)'));
 {"type":"LineString","coordinates":[[1,0],[2,0],[4,0]]}

 --LINESTRINGM
 select ST_ASgeojson(ST_GeomFromText('**LINESTRINGM**(**1 0 0, 2 0 10, 4 0
 20**)'));
 {"type":"LineString","coordinates":[**[1,0],[2,0],[4,0]**]}

 --LINESTRINGZ
 select ST_ASgeojson(ST_GeomFromText('LINESTRINGz(1 0 0, 2 0 10, 4 0 20)'))
 ;
 {"type":"LineString","coordinates":[[1,0,0],[2,0,10],[4,0,20]]}

 --LINESTRINGZM
 select ST_ASgeojson(ST_GeomFromText('**LINESTRINGZM**(**1 0 0 0, 2 0 10 0,
 4 0 20 0**)'))
 {"type":"LineString","coordinates":[**[1,0,0],[2,0,10],[4,0,20]**]}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3903>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list