Opened 4 years ago
Closed 3 years ago
#4721 closed defect (worksforme)
SQL Error [XX000] with ST_AddEdgeModFace
Reported by: | jeromeu | Owned by: | strk |
---|---|---|---|
Priority: | critical | Milestone: | PostGIS 3.0.4 |
Component: | topology | Version: | 3.0.x |
Keywords: | topology edge Error | Cc: |
Description
Hello,
I am trying to manually add edges to a topology schema. I receive the following error:
SQL Error [XX000]: ERROR: Second line start point too far from first line end point
My query is
SELECT topology.ST_AddEdgeModFace('zip', 4802117, 4802118, ST_GeomFromText('LINESTRING(327015.5 6654998, 333892 6646902)', 3857))
The nodes seem correctly placed and their corredinates correspond to the entered ones for the linestring. All 4 edges connected to the nodes do have a left or right face 0.
In other words, I want to add a new edge, where there is no face yet. The nodes are already created, let's call them point B (id: 4802117, coordinates: 327015.5 6654998) on segment ABC and point E (id: 4802118, coordinates: 333892 6646902) on segment DEF that is roughly parallel to ABC. I want an edge connecting B and E.
I am using
POSTGIS="3.0.1 ec2a9aa" [EXTENSION] PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 " SFCGAL="1.3.6" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.4.2, released 2019/06/28 GDAL_DATA not found" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" WAGYU="0.4.3 (Internal)" TOPOLOGY RASTER
and
PostgreSQL 12.1 (Ubuntu 12.1-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit
I would deeply appreciate your help in getting around that issue.
Kind regards
Change History (7)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
I tried, but currently I can't: When just copying the 4 edges into a new topology (or even a bit more), adding that new edge works.
Of course the topology schema I want to add that edge into is much larger than 4 edges. I ran SELECT topology.ValidateTopology, and there is a number of Errors, but none seems in the vicinity of that edge I am trying to add.
I will keep on investigating. If anyone has any idea, I am interested.
Thanks for your help
comment:3 by , 4 years ago
Milestone: | PostGIS PostgreSQL → PostGIS 3.0.2 |
---|
comment:4 by , 4 years ago
Milestone: | PostGIS 3.0.2 → PostGIS 3.1.0 |
---|
comment:5 by , 4 years ago
In presence of an invalid topology (ValidteTopology returns a number of errors, you say) any bet is off. What you could do to debug this is making a copy of the topology (CopyTopology) and then reduce the size of it incrementally while still being able to reproduce the issue. Then you could enable debugging (in liblwgeom/lwgeom_topo.c and topology/postgis_topology.c there are commented-out #define on top of the file).
I'm interested in knowing if you have more info about this case.
comment:6 by , 4 years ago
Milestone: | PostGIS 3.1.0 → PostGIS 3.0.4 |
---|
comment:7 by , 3 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Closing as non-reproducible
Can you provide a minimal testcase showing the problem ? We need real data (HEXEWKB format is best)