Opened 8 years ago
Closed 7 years ago
#3702 closed defect (fixed)
ST_LineToCurve not working as documented
Reported by: | mkuhn | Owned by: | robe |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.3.3 |
Component: | documentation | Version: | 2.3.x |
Keywords: | Cc: |
Description
The examples from the postgis documentation and the result of my local installation do not behave the same way.
Documentation says:
-- 3D example SELECT ST_AsEWKT(ST_LineToCurve(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 8, 5 6 4, 7 8 4, 9 10 4)'))); st_asewkt ------------------------------------ CIRCULARSTRING(1 2 3,5 6 4,9 10 4)
My local installation does:
-- 3D example SELECT ST_AsEWKT(ST_LineToCurve(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 8, 5 6 4, 7 8 4, 9 10 4)'))); st_asewkt ------------------------------------ "LINESTRING(1 2 3,3 4 8,5 6 4,7 8 4,9 10 4)"
SELECT postgis_version() "2.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"
Am I misunderstanding something?
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Component: | postgis → documentation |
---|---|
Owner: | changed from | to
Note:
See TracTickets
for help on using tickets.
No you are not misunderstanding. I get the same answer you do on my 2.3
I think something changed between now and when the example was done. I suspect that example was done pre-2.0.
As luck would have it, I have a PostGIS 1.5 install sitting around and confirmed the answer agrees with what's in the docs, but not my PostGIS 2.3 answer.
It doesn't quite make sense to me that a perfect circle can be approximated with such few points, so I'm guessing the approximation changed to be less forgiving and more accurate.
For example this works: