Hello,
I am creating a polygon feature layer from a postgres table and saving it to a file geodatabase. The rough outline of the workflow is MakeQueryLayer -> CopyFeatures -> MakeFeatureLayer -> Delete -> addDataFromPath -> save.
The query returns 8470 rows where one column is a polygon. However, if I create a polygon feature layer with this query, ArcGIS will only populate 1130 rows. If I use ST_Simplify on the polygon column, ArcGIS will populate 4643 rows.
So there appears to be some limit on the number or complexity of polygons in a given layer. I can workaround this by assigning them to multiple layers, but I would like to understand exactly what the limitation is in this scenario. Can someone please clarify?
Thanks!
Solved! Go to Solution.
Just throwing it out there but can you check the geometry for errors in the Postgres gui?
Just throwing it out there but can you check the geometry for errors in the Postgres gui?
This at least uncovered some more info. I have them split into 5 groups and found an invalid polygon in group 5, but that group loads fine.
But it turns out my workaround doesn't actually work. Group 4 is still missing some polygons, and the number missing from there plus the total number in group 5 is the same amount missing when I run the query all as one group. So it's hitting this one polygon and then stops but doesn't throw an error.
Still investigating...
Multipart polygons?
8470 are those rows id'ed as unique? or one of these number 1130, 4643 The latter two suggest the multipart/singlepart idea
@JoshuaBixby any ideas?
They are all unique, and they should all be single polygons not multipolygons. I think I've narrowed it down to a problematic row. It's valid with hand without using ST_Simplify.
Thanks @DavidPike and @DanPatterson for the responses. It turns out there was a polygon where the first coordinate was repeated. PostGIS apparently still considers this valid (not sure I agree), and ArcGIS doesn't throw an error, but simply ends the query at the problematic polygon.