[gdal-dev] curved polygon -> polygon

Martin Landa landa.martin at gmail.com
Wed Nov 26 03:17:38 PST 2014


I wonder why curved polygons are not approximated to polygons somehow
automatically. Eg. conversion such data fails

$ ogr2ogr -f PostgreSQL PG:dbname=ruian_test
Parcely -overwrite
Warning 1: Geometry to be inserted is of type Curve Polygon, whereas
the layer geometry type is Polygon.
Insertion is likely to fail
ERROR 1: COPY statement failed.
ERROR:  Geometry type (CurvePolygon) does not match column type (Polygon)
CONTEXT:  COPY parcely, line 18, column originalnihranice:

because some features are curved polygons even geometry column is `polygon`:

$ ogrinfo /vsicurl/http://vdp.cuzk.cz/vymenny_format/soucasna/20141031_OB_564567_UKSH.xml.gz
Parcely -fid 2815 | grep OriginalniHranice
Geometry (OriginalniHranice): Polygon
  OriginalniHranice = CURVEPOLYGON (CIRCULARSTRING (-755129.01
-990678.86,-755126.27 -990676.99,-755123.39 -990678.25,-755123.18
-990678.53,-755123.14 -990682.18,-755125.92 -990683.76,-755128.53
-990682.62,-755129.22 -990679.38,-755129.01 -990678.86))

Thanks for clarification in advance, Martin

Martin Landa

More information about the gdal-dev mailing list