[Gdal-dev] Shape Polygon to Line

Frank Warmerdam fwarmerdam at gmail.com
Wed Aug 17 10:01:29 EDT 2005


On 8/17/05, Julien Demaria <dem at acri-st.fr> wrote:
> Hi,
> 
> I try to translate a polygon shapefile to a line shapefile with ogr2ogr ;
> I've tried
> ogr2ogr -nlt LINESTRING -lco SHPT=ARC Austrialine.shp Austria.shp
> but it returns this error :
> ERROR 1: Attempt to write non-linestring (POLYGON) geometry to ARC type
> shapefile.
> ERROR 1: Terminating translation prematurely after failed translation of
> layer Austria
> 
> Is it possible to translate polygon to line using ogr2ogr ?

Julien,

Sorry, not I don't think it is.  You could write a python script to
accomplish this transformation, but it would be a non-trivial
effort.  

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list