[postgis-tickets] [PostGIS] #4843: GEOS error

PostGIS trac at osgeo.org
Tue Feb 9 07:18:21 PST 2021


#4843: GEOS error
--------------------------------+---------------------------
 Reporter:  ezimanyi            |      Owner:  pramsey
     Type:  defect              |     Status:  new
 Priority:  medium              |  Milestone:  PostGIS 3.1.2
Component:  postgis             |    Version:  2.5.x
 Keywords:  GEOS ST_Intersects  |
--------------------------------+---------------------------
 I have loaded into PostGIS OSM data from Belgium. I have synthetically
 generated trips on the road network and I need to project the trips
 (LINESTRING) to the municipalities (POLYGON). When I perform an
 intersection of one trip and one municipality (whose name is Anderlecht) I
 get an error from GEOS. A have isolated the trip and the municipality that
 generates the error in CSV files. This is how to reproduce the error


 {{{
 $ createdb geoserror
 $ psql geoserror

 # create extension postgis
 # create table trip(tripgeo geometry);
 # copy trip(tripgeo) from '/path/to/file/trip.csv' CSV HEADER;
 # create table municipality(municgeo geometry);
 # copy municipality(municgeo) from '/path/to/file/municipality.csv' CSV
 HEADER;
 # select st_intersects(municgeo, tripgeo) from municipality, trip;
  st_intersects
 ---------------
  t
 (1 row)

 # select st_intersection(municgeo, tripgeo) from municipality, trip;
 2021-02-09 16:06:13.040 CET [6575] ERROR:  lwgeom_intersection: GEOS
 Error: TopologyException: found non-noded intersection between LINESTRING
 (476752 6.59276e+06, 476752 6.59275e+06) and LINESTRING (476753
 6.59276e+06, 476752 6.59275e+06) at 476752.16199349175 6592757.7807903718
 2021-02-09 16:06:13.040 CET [6575] STATEMENT:  select
 st_intersection(municgeo, tripgeo) from municipality, trip;
 ERROR:  lwgeom_intersection: GEOS Error: TopologyException: found non-
 noded intersection between LINESTRING (476752 6.59276e+06, 476752
 6.59275e+06) and LINESTRING (476753 6.59276e+06, 476752 6.59275e+06) at
 476752.16199349175 6592757.7807903718

 # select postgis_full_version();
 POSTGIS="2.5.5" [EXTENSION] PGSQL="130" GEOS="3.8.0-CAPI-1.13.1 "
 PROJ="Rel. 6.3.1, February 10th, 2020" GDAL="GDAL 3.0
 .4, released 2020/01/28" LIBXML="2.9.10" LIBJSON="0.13.1" RASTER


 }}}

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