Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobiselrobis suggested I have this output:

INFO: Open of C:\\ArcGIS data\\Mun_region.shp' using driver ESRI Shapefile' successful.

Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
OGR_GEOMETRY (String) = MULTIPOLYGON

OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobis suggested I have this output:

INFO: Open of C:\\ArcGIS data\\Mun_region.shp' using driver ESRI Shapefile' successful.

Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
OGR_GEOMETRY (String) = MULTIPOLYGON

OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobis suggested I have this output:

INFO: Open of C:\\ArcGIS data\\Mun_region.shp' using driver ESRI Shapefile' successful.

Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
OGR_GEOMETRY (String) = MULTIPOLYGON

OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON

added 54 characters in body
Source Link
Below the Radar
  • 3.6k
  • 1
  • 31
  • 60

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobiselrobis suggested I have this output:

INFO: Open of C:\\ArcGIS data\\Mun_region.shp' using driver ESRI Shapefile' successful.

Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
OGR_GEOMETRY (String) = MULTIPOLYGON

OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobis suggested I have this output:

INFO: Open of C:\\ArcGIS data\\Mun_region.shp' using driver ESRI Shapefile' successful.

Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
OGR_GEOMETRY (String) = MULTIPOLYGON

OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobis suggested I have this output:

INFO: Open of C:\\ArcGIS data\\Mun_region.shp' using driver ESRI Shapefile' successful.

Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
OGR_GEOMETRY (String) = MULTIPOLYGON

OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON

added 440 characters in body
Source Link
Below the Radar
  • 3.6k
  • 1
  • 31
  • 60

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobis suggested I have this output:

INFO: Open of C:\\ArcGIS data\\Mun_region.shp' using driver ESRI Shapefile' successful.

Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
OGR_GEOMETRY (String) = MULTIPOLYGON

OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:

datasource = ogr.Open("c:\\temp\\data.shp")
layer = datasource.GetLayer(0)
print(layer.GetGeomType())

The print returns: >> -2147483645

I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type?

Edit: After using ogrinfo as elrobis suggested I have this output:

INFO: Open of C:\\ArcGIS data\\Mun_region.shp' using driver ESRI Shapefile' successful.

Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0
OGR_GEOMETRY (String) = MULTIPOLYGON

OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON

edited tags; edited title
Link
Below the Radar
  • 3.6k
  • 1
  • 31
  • 60
Loading
Source Link
Below the Radar
  • 3.6k
  • 1
  • 31
  • 60
Loading