[postgis-tickets] [PostGIS] #4323: Bug in documentation for ST_StraightSkeleton and ST_ApproximateMedialAxis

PostGIS trac at osgeo.org
Mon Feb 11 02:21:34 PST 2019


#4323: Bug in documentation for ST_StraightSkeleton and ST_ApproximateMedialAxis
---------------------+---------------------
 Reporter:  br0ke    |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:
Component:  postgis  |    Version:
 Keywords:           |
---------------------+---------------------
 It is said in docs that `ST_StraightSkeleton` and
 `ST_ApproximateMedialAxis` are working with 3D geometries and don't drop
 z-index, but in fact they always return 2d geometry whether I pass 2d or
 3d input geometry.

 Is it a bug in documentation?

 {{{
 SELECT ST_AsText(ST_ApproximateMedialAxis(ST_GeomFromText('POLYGON((0 0
 10, 0 50 10, 10 50 10, 10 0 10, 0 0 10))')))

 +-----------------------------+
 | st_astext                   |
 |-----------------------------|
 | MULTILINESTRING((5 5,5 45)) |
 +-----------------------------+


 SELECT ST_AsText(ST_ApproximateMedialAxis(ST_GeomFromText('POLYGON Z ((0 0
 10, 0 50 10, 10 50 10, 10 0 10, 0 0 10))')))

 +-----------------------------+
 | st_astext                   |
 |-----------------------------|
 | MULTILINESTRING((5 5,5 45)) |
 +-----------------------------+


 SELECT ST_AsEWKT(ST_ApproximateMedialAxis(GeomFromEWKT('POLYGON((0 0 10, 0
 50 10, 10 50 10, 10 0 10, 0 0 10))')))

 +-----------------------------+
 | st_asewkt                   |
 |-----------------------------|
 | MULTILINESTRING((5 5,5 45)) |
 +-----------------------------+


 SELECT ST_AsEWKT(ST_ApproximateMedialAxis(GeomFromEWKT('POLYGON Z((0 0 10,
 0 50 10, 10 50 10, 10 0 10, 0 0 10))')))

 +-----------------------------+
 | st_asewkt                   |
 |-----------------------------|
 | MULTILINESTRING((5 5,5 45)) |
 +-----------------------------+
 }}}

 PostGIS version:
 {{{POSTGIS="2.3.7 r16523" PGSQL="95" GEOS="3.4.2-CAPI-1.8.2 r3921"
 SFCGAL="1.3.0" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released
 2013/08/26" LIBXML="2.9.1" LIBJSON="0.11.99" RASTER}}}

 PostgreSQL version:
 {{{PostgreSQL 9.5.11 on x86_64-pc-linux-gnu (Debian 9.5.11-1.pgdg80+1),
 compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit}}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4323>
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