When I run the following command to import by data from an ESRI fgdb to postgis...

ogr2ogr -f "PostgreSQL" -a_srs "EPSG:28355" -t_srs "EPSG:3857" PG:"dbname=tp_test user=postgres port=54321 password=xxxxxxx host=localhost" -overwrite P:\2012\183_TownPlanning_Symbology\Working\QueryLayer\TP_Query_Final_28355.gdb

...I get...!

Warning 1: organizePolygons() received an unexpected geometry. Either a polygon with interior rings, or a polygon with less than 4 points, or a non-Polygon geometry. Return arguments as a collection. Warning 1: Geometry of polygon cannot be translated to Simple Geometry. All poly gons will be contained in a multipolygon.

I have checked geometry in ESRI and it reports no errors. I am running multipart to singlepart to see if this resolves the issues but this is crashing arcmap 10.1 as is dissolve. It ran a sort without issues and you can open the dataset.

I successfully imported the dataset earlier but then had to run the ESRI Dice tool to split the large polygons to no more than 15,000 vertices so that it processes faster. enter image description here

I am new to postgis.

Is there a way to correct the issues in the new gdb or to split the polygons in postgis itself?

1 Answer 1


If your data is already in PostGIS, try running:

select * from table where ST_NPoints(the_geom) < 4

This will return all rows that cause the warning, that is, it will help you track down data errors in PostGIS.

  • I only have the dataset in postgis from BEFORE running Dice. If I am going to use the existing postgis dataset I need a tool similar to Dice to split each polygon to <15,000 vertices.
    – GeorgeC
    Nov 28, 2012 at 13:13
  • you could try if error is coming from that data by runnis isValid() and ST_NPoints() to data Nov 28, 2012 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.