1

I use ogr2ogr to import a shapefile in a sqlserver database. It works fine but the geometries inserted in the database are composed of polygons with holes (interior rings) whereas in the source shapefile geometries are composed of polygons without holes.

Is there a way to ask ogr2ogr not to produce polygons with holes? I'd like ogr2ogr not to modify the geometries.

Thanks, Mickaël

mvera
  • 904
  • 12
  • 23
  • Usually ogr2ogr does not alter the geometry at all. Can you provide a subset of the shapefile, ideally a section where a ring is introduced? Adding the exact command you used would also help a lot to understand/solve your problem. And lastly - you're more likely to get an answer for this GIS-related question over at [GIS.SE](http://gis.stackexchange.com/). – Kersten Sep 16 '15 at 06:19
  • 1
    I did understand why ogr2ogr did modify the geometry. In the shapefile the geometry was defined with an exterior ring which overlaps itself on more than one consecutive points. Which is not allowed by sqlserver. So ogr2ogr introduced a hole. The geometry was a "0" defined by a single ring with a trick to define the hole.As this polygon is not compatible with OGC rules the shapefile producer will have to redefine its geometry. Thanks. – mvera Sep 16 '15 at 20:21

0 Answers0