[postgis-tickets] [PostGIS] #4696: ST_LocateAlong returns EMPTY geom for certain terminal measures
PostGIS
trac at osgeo.org
Sun May 31 11:54:03 PDT 2020
#4696: ST_LocateAlong returns EMPTY geom for certain terminal measures
----------------------+--------------------------------
Reporter: pauldzy | Owner: pramsey
Type: defect | Status: closed
Priority: medium | Milestone: PostGIS 2.5.5
Component: postgis | Version: 2.5.x
Resolution: wontfix | Keywords: ST_LocateAlong LRS
----------------------+--------------------------------
Changes (by robe):
* status: new => closed
* resolution: => wontfix
* milestone: => PostGIS 2.5.5
Comment:
You have a mistake in your query you are not outputting rinsed but calling
it rinsed.
It should be
{{{
SELECT
ST_IsValid(a.rawewkb) AS raw_valid
,ST_M(ST_StartPoint(a.rawewkb)) AS raw_startM
,ST_M(ST_Endpoint(a.rawewkb)) AS raw_endM
,ST_AsEWKT(ST_LocateAlong(a.rawewkb,30.46338)) AS raw_locatealong
,ST_IsValid(a.rawewkb) AS rinsed_valid
,ST_M(ST_StartPoint(a.rinsed)) AS rinsed_startM
,ST_M(ST_Endpoint(a.rinsed)) AS rinsed_endM
,ST_AsEWKT(ST_LocateAlong(a.rinsed,30.46338)) AS rinsed_locate
FROM (
SELECT
aa.rawewkb
,ST_AsEWKT(aa.rawewkb) AS txted
,ST_GeomFromEWKT(ST_AsEWKT(aa.rawewkb)) AS rinsed
FROM (
SELECT
ST_GeomFromEWKB(decode('AQIAAGDOEwAAAwAAAEei4br9RCdBbmmOozvgLEHXnlkSoHY+QBCLlwkIRSdBIlcDZybgLEE6r7FLVO86QBDucKJ2RSdBsmULZJjfLEEAAAAAAAAAAA==','base64'))
AS rawewkb
) aa
) a;
}}}
When I run these I get
{{{
Original: true, 30.463379999999997, 0, SRID=5070;MULTIPOINTM EMPTY
Rinsed: true, 30.46338, 0, SRID=5070;MULTIPOINTM(762494.8650027
946205.819445891 30.46338)
}}}
The ST_AsText is causing your geometry to be rounded, so it's not the same
geometry as you had to start with. Sadly this is just the reality of not
having a tolerance in our system. That might come in the future.
So I'm going to mark this as a won't fix.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4696#comment:1>
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