[Gdal-dev] line to polygon with ogr2ogr?

Vincent Schut schut at sarvision.com
Tue Mar 25 11:50:51 EST 2003


Of course I should have added that I tried it, but it gave me an error:

vincent at STROOPWAFEL:~/indo_mof_gis/2000/Kalsel> ogr2ogr -nlt MULTIPOLYGON 
newahph.shp ahph.shp
ERROR 1: Attempt to write non-polygon (LINESTRING) geometry to  type 
shapefile.
ERROR 1: Terminating translation prematurely after failed
translation of layer ahph



On Tuesday 25 March 2003 17:32, Vincent Schut wrote:
> Just to be really sure I thought I'd ask...:
>
> Is it possible to convert a line (multiline) shapefile to a polygon
> shapefile using ogr2ogr?
> I have a shapefile (I did not create myself, of course...) which was for
> some (none) reason saved as line, but should be polygon. All lines are
> closed as far as I could see, but the type is just wrong and I can't add it
> to my main polygon table for this theme in postgis. Can I change this with
> ogr2ogr, or do I need some other trick?
>
> Regards,

-- 
______________________________________
Vincent Schut (schut at sarvision.com)
Sarvision B.V.
Wageningen, The Netherlands
www.sarvision.com



More information about the Gdal-dev mailing list