[gdal-dev] Closed polyline from DXF as line or area?
Even Rouault
even.rouault at spatialys.com
Mon Jan 26 07:36:55 PST 2015
Le lundi 26 janvier 2015 16:25:04, Andre Joost a écrit :
> Am 26.01.2015 um 15:29 schrieb Even Rouault:
> > It seems the documentation matches the initial implementation but has
> > been outdated by later changes. Indeed,
> > ogr/ogrsf_frmts/dxf/ogrdxflayer.cpp contains
>
> > the following (disabled) code :
> The behaviour might have changed with the implementation of is ticket:
> https://trac.osgeo.org/gdal/ticket/4680
> but noone thought of adjusting the dxf driver manpage.
>
> BTW: creating polygons from closed lines is still not available in GDAL
> or other osgeo command line tools?
> <http://osgeo-org.1560.x6.nabble.com/gdal-dev-MULTILINESTRING-to-MULTIPOLYG
> ON-using-ogr2ogr-td5018430.html> was the latest I could find.
André,
Looks like it works now with trunk. Probably a side effect of my recent work on curve
geometries where I significantly enhanced conversions between geometry types
$ cat test.csv
id,WKT
1,"LINESTRING(0 0,0 1,1 1,1 0,0 0)"
2,"MULTILINESTRING((0 0,0 1,1 1,1 0,0 0))"
l$ ogr2ogr -f csv /vsistdout/ test.csv -nlt polygon -dsco geometry=as_wkt -select id
WKT,id,
"POLYGON ((0 0,0 1,1 1,1 0,0 0))",1
"POLYGON ((0 0,0 1,1 1,1 0,0 0))",2
$ ogr2ogr -f csv /vsistdout/ test.csv -nlt multipolygon -dsco geometry=as_wkt -select id
WKT,id,
"MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)))",1
"MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)))",2
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list