[postgis-tickets] [PostGIS] #4902: toTopoGeom exception on TIGER Counties

PostGIS trac at osgeo.org
Thu Apr 29 09:38:26 PDT 2021


#4902: toTopoGeom exception on TIGER Counties
---------------------+---------------------------
 Reporter:  pramsey  |      Owner:  strk
     Type:  defect   |     Status:  assigned
 Priority:  medium   |  Milestone:  PostGIS 3.2.0
Component:  postgis  |    Version:  master
 Keywords:           |
---------------------+---------------------------
 Download from:

 * https://catalog.data.gov/dataset/tiger-line-shapefile-2019-nation-u-s
 -current-county-and-equivalent-national-shapefile

 Load to database
 {{{
 shp2pgsql -D -s 4269 -I tl_2019_us_county counties | psql postgis
 }}}

 Reproject and build topology
 {{{
 -- Planar projection
 alter table counties alter column geom type geometry(multipolygon, 2163)
 using st_transform(geom, 2163);

 SELECT topology.CreateTopology('counties_topo', 2163, 10.0);
 SELECT topology.AddTopoGeometryColumn('counties_topo', 'public',
 'counties', 'topo_geom', 'POLYGON');
 UPDATE counties SET topo_geom = topology.toTopoGeom(geom, 'counties_topo',
 1);
 }}}
 Yields error
 {{{
 ERROR:  SQL/MM Spatial exception - curve not simple
 CONTEXT:  PL/pgSQL function totopogeom(geometry,topogeometry,double
 precision) line 115 at FOR over SELECT rows
 PL/pgSQL function totopogeom(geometry,character varying,integer,double
 precision) line 88 at assignment
 }}}
 Latest postgis/geos
 {{{
  POSTGIS="3.2.0dev 3.1.0rc1-162-g46efb9f2d" [EXTENSION] PGSQL="130"
 GEOS="3.10.0dev-CAPI-1.15.0" PROJ="8.0.0" GDAL="GDAL 3.2.0, released
 2020/10/26" LIBXML="2.9.4" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0
 (Internal)" (core procs from "3.2.0dev 3.1.0rc1-155-gb16f9e0f6" need
 upgrade) TOPOLOGY RASTER (raster procs from "3.2.0dev
 3.1.0rc1-155-gb16f9e0f6" need upgrade)
 }}}

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