AW: Re: [FWTools] import problems shp -> postgres using ogr2ogr

christian.michels at christian.michels at
Thu Jan 5 09:47:16 EST 2006

just one more question on the ogr2ogr tool: is there any .NET wrapper out there which makes the ogr2ogr functions accessible to .NET programming on windows environment ?

thanx - chris

>hi frank,
>your workaround does the job !
>I field a bug on that issue on your bugzilla system - thank you very much for 
>the quick support !
>>On 1/4/06, christian.michels at
>><christian.michels at> wrote:
>>> Since some objects could be imported I think the shp file is may be 
>>corrupted ?! I do not really understand what constraint 
>>"enforce_geotype_wkb_geometry" checks - Would be great if somebody could help 
>>me on that !
>>> By the way - I managed to import some line shp files via ogr2ogr and that 
>>worked fine !
>>I would appreciate it if you could file a bug on this issue.
>>But I think you can workaround the issue by specifying the "-nlt GEOMETRY"
>>option on the ogr2ogr commandline.
>>I believe the problem is that the shapefile is identified as type POLYGON
>>but has some multi-island polygons which translate as MULTIPOLYGON.
>>Ogr2ogr creates the table with the geometry type polygon, but multipolygon
>>is not compatible with that and as of PostGIS 1.0 geometry type is
>>strictly enforced.
>>The fix is for OGR's Shapefile driver to always return the
>>layer type as GEOMETRY for polygon files since we can't
>>know if they are all polygon, all multipolygon or a mix of
>>the two.
>>Best regards,
>>I set the clouds in motion - turn up   | Frank Warmerdam, 
>warmerdam at
>>light and sound - activate the windows |
>>and watch the world go round - Rush    | Geospatial Programmer for Rent
>FWTools mailing list
>FWTools at

More information about the FWTools mailing list