[gdal-dev] MULTILINESTRING to MULTIPOLYGON using ogr2ogr

Alisson Barbosa alisson.uece at gmail.com
Mon Nov 26 03:47:31 PST 2012


Can anybody help me?

2012/11/23 Alisson Barbosa <alisson.uece at gmail.com>

> Hi friends,
>
> I would like to transform a shape with multilinestring in a shape with
> polygons using ogr2ogr.
>
> Polygon to multilinestring, I use:
> ogr2ogr -f "ESRI Shapefile" -overwrite "C:/Users/Alisson/Basins3.shp"
> "C:/Users/Alisson/Basins2.shp" -sql "SELECT * FROM Basins2" -skipfailures
> -nlt MULTILINESTRING
>
> This works.
>
> Multilinestring to multipolygon, I use:
> ogr2ogr -f "ESRI Shapefile" -overwrite "C:/Users/Alisson/polygon.shp"
> "C:/Users/AlissonContorno30.shp" -sql "SELECT * FROM Contorno30"
> -skipfailures -nlt MULTIPOLYGON
>
> But, this error appears:
> ERROR 1: Attempt to write non-polygon (LINESTRING) geometry to POLYGON
> type shapefile.
>
> Can you help me?
>
> Best regards,
> --
> Alisson Barbosa
> Systems Analyst - FUNCEME
> M.Sc. in Computer Science - MACC
> Graduate in Computer Science  - UECE
>
>
>


-- 
Alisson Barbosa
Systems Analyst - FUNCEME
M.Sc. in Computer Science - MACC
Graduate in Computer Science  - UECE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121126/2ab38f2b/attachment.html>


More information about the gdal-dev mailing list