I'm having difficulties with the Geometry types in PostGIS and/or ArcPy and hope some of you can shed a light on what I'm missing or how I can fix it.
I have a .gdb containing Polygons. The Table in ArcGIS lists the features as Polygons and using ArcPy using the following code I get the Output "Polygon" as well.
desc = arcpy.Describe("Path to Featureclass") geometryType = desc.shapeType print(geometryType)
Now when I upload the featureclass using ogr2ogr:
ogr2ogr -f "PostgreSQL" “PG:host=[host] port=[port] dbname=[dbName] user=[user]" “[PathtoFileGDB]” -overwrite -skipfailures –progress
And then access it via psycopg2:
import psycopg2 from shapely import wkb conn = psycopg2.connect(host...) conn.autocommit = True cursor = conn.cursor() cursor.execute('''select * from testfeatures;''') record = cursor.fetchall() conn.commit() conn.close()
I'll get Multipolygons as a geometry. I already ran the "Repair Geometry" Tool in ArcGIS Pro before uploading the .gdb and the features display fine at every turn...
This sums up my problem, if you need any more information don't hesitate to ask and I'll try to provide it.