[gdal-dev] ogr2ogr OCI to shape : Multipolygon (Oracle Gtype = 7 ) not supported ?
Rémy GOURRAT
rgourrat at ag-carto.fr
Wed Jul 16 10:43:20 PDT 2014
I try to make a Track ticket for enhancement of ogr2ogr for Oracle Gtype = 7 and the curves
But I can't login me, each time, it said to me I don't have the create ticket privilege.
How to get this privilege ?
or someone can do it for me ?
thanks for your help
Rémy
De : gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-bounces at lists.osgeo.org] De la part de Rémy GOURRAT
Envoyé : mercredi 16 juillet 2014 18:23
À : gdal-dev at lists.osgeo.org
Objet : Re: [gdal-dev] ogr2ogr OCI to shape : Multipolygon (Oracle Gtype = 7 ) not supported ?
Solved ! i get the issue and the workaround of my problem.
When you use ogr2ogr to translate a Oracle Gtype = 3 (simple Polygon with hole or not) to a shapefile
and this polygon have some curves like by example after a buffer treatment (it's Ok in SDO_GEOMETRy),
Ogr2ogr indent curves in many little polyline.
Translation in shapefile is ok.
But When you use ogr2ogr to translate an Oracle Gtype = 7 (multi-Polygon with hole or not, with at less 2 exteriors rings) to a shape
and this polygon have some curves like by example after a buffer treatment (it's Ok in SDO_GEOMETRY),
Ogr2ogr don't indent curves in many little polyline.
Translation in shapefile seems ok, without errors message but the Geometry in the fileshape is never writing.
It's normal because Shapefile don't enjoy curves.
So i modified my Oracle query like this :
Old Version :
sdo_geom.sdo_buffer(SDO_AGGR_CONCAT_LINES(sdo_util.rectify_geometry(GEOMETRY,0.001) ),50,0.001)
New Version : SDO_GEOM.SDO_ARC_DENSIFY(sdo_geom.sdo_buffer(SDO_AGGR_CONCAT_LINES(sdo_util.rectify_geometry(GEOMETRY,0.001)),50,0.001),0.001,'arc_tolerance=1')
SDO_GEOM.SDO_ARC_DENSIFY : indent curves in many little polyline for Gtype = 3 or 7
So ogr2ogr is always Ok to translate in ShapeFile.
Rémy
De : gdal-dev-bounces at lists.osgeo.org<mailto:gdal-dev-bounces at lists.osgeo.org> [mailto:gdal-dev-bounces at lists.osgeo.org] De la part de Rémy GOURRAT
Envoyé : mardi 15 juillet 2014 13:44
À : gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
Objet : [gdal-dev] ogr2ogr OCI to shape : Multipolygon (Oracle Gtype = 7 ) not supported ?
Hi,
I try to export in shape a buffer from union of lines.
I validated this query in Sqldevelopper before use it with Ogr :
"select '1' as "FID",sdo_geom.sdo_buffer(SDO_AGGR_CONCAT_LINES(sdo_util.rectify_geometry(GEOMETRY,0.001) ),50,0.001) as geometry from assc"
After created this geometry in oracle temporary table, I can display it without issue in Autocad Map with Fdo Oracle Provider.
With ogr2ogr, Shape is created but when I open with Qgis i see 1 attribute line (it's Ok) but i don't see geometry on the map and the shape size is only 1ko.
This is my command line :
ogr2ogr -f "ESRI Shapefile" c:\temp\ASSC.shp OCI:[username]/[password]@[instance] -sql "select '1' as "FID",sdo_geom.sdo_buffer(SDO_AGGR_CONCAT_LINES(sdo_util.rectify_geometry(GEOMETRY,0.001) ),50,0.001) as geometry from assc" -skipfailures -overwrite -dim 2
it's running well and no issue in debug mode :
OGR2OGR: 1 features written in layer 'ASSC'
OCI: 1 features read on layer 'select 'EU01'...
If I don't use SDO_AGGR_CONCAT_LINES in my query wich create the unique multi-polygon (Oracle Gtype = 7), the shape is created too and I can see more 2000 buffer polygon geometry (Oracle Gtype = 3) in Qgis.
ogr2ogr -f "ESRI Shapefile" c:\temp\ASSC.shp OCI:[username]/[password]@[instance] -sql "select '1' as "FID",sdo_geom.sdo_buffer(sdo_util.rectify_geometry(GEOMETRY,0.001),50,0.001) as geometry from assc" -skipfailures -overwrite -dim 2
So I ask me the question is there a issue with ogr2ogr with Oracle Multipolygon (Gtype = 7) ?
Is there a work around ?
Thanks
Rémy
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140716/85c53a5b/attachment.html>
More information about the gdal-dev
mailing list