[OSGeo-Discuss] Can't convert .dgn file to shape file by using ogr2ogr
Simon Cropper
simoncropper at fossworkflowguides.com
Tue Jul 10 21:22:39 PDT 2012
On 11/07/12 13:41, Bui Chi Tai wrote:
> Thanks Simon for your help,
>
> After modifying the command to "ogr2ogr Dc16.shp Dc16.dgn" , I got an
> other error:
>
> /Warning 6: Normalized/laundered field name: 'GraphicGroup' to 'GraphicGro'
> ERROR 1: Attempt to write non-linestring (POINT) geometry to ARC type
> shapefile.
>
> ERROR 1: Terminating translation prematurely after failed
> translation of layer elements (use -skipfailures to skip errors)/
>
> Do you know this error ?
>
> Thanks and regards,
>
> Tai
> ------------------------------------------------------------------------
> *From:* Simon Cropper <simoncropper at fossworkflowguides.com>
> *To:* taibc <taibc_coltech at yahoo.com>
> *Sent:* Wednesday, July 11, 2012 10:12 AM
> *Subject:* Re: [OSGeo-Discuss] Can't convert .dgn file to shape file by
> using ogr2ogr
>
> On 11/07/12 12:17, taibc wrote:
> > Dear friends,
> >
> > I tried to convert .dgn file to shape files by using ogr2ogr with FWTools
> > Shell as below:
> >
> > ogr2ogr -f "ESRI Shapefile" Dc16.dgn Dc16.shp
> >
> > but I got an bellow error:
> > /
> > FAILURE:
> > Unable to open datasource `Dc16.shp' with the following drivers.
> > -> ESRI Shapefile
> > -> MapInfo File
> > -> UK .NTF
> > -> SDTS
> > -> TIGER
> > -> S57
> > -> DGN
> > -> VRT
> > -> REC
> > -> Memory
> > -> BNA
> > -> CSV
> > -> NAS
> > -> GML
> > -> GPX
> > -> KML
> > -> GeoJSON
> > -> Interlis 1
> > -> Interlis 2
> > -> GMT
> > -> SQLite
> > -> ODBC
> > -> PGeo
> > -> OGDI
> > -> PostgreSQL
> > -> MySQL
> > -> XPlane
> > -> AVCBin
> > -> AVCE00
> > -> DXF
> > -> Geoconcept
> > -> GeoRSS
> > -> GPSTrackMaker
> > -> VFK
> > /
> > Are there anyone know how to fix this error ?
> >
> > Thanks and Regards,
> >
> > Tai
> >
> > --
> > View this message in context:
> http://osgeo-org.1560.n6.nabble.com/Can-t-convert-dgn-file-to-shape-file-by-using-ogr2ogr-tp4987477.html
> > Sent from the OSGeo Discuss mailing list archive at Nabble.com
> <http://nabble.com/>.
> > _______________________________________________
> > Discuss mailing list
> > Discuss at lists.osgeo.org <mailto:Discuss at lists.osgeo.org>
> > http://lists.osgeo.org/mailman/listinfo/discuss
> >
>
> Try removing the -f "ESRI Shapefile" as that is the expected default,
> and swap your destination and source file around...
>
> so...
>
> ogr2ogr Dc16.shp Dc16.dgn
>
> look here...
>
> http://www.gdal.org/ogr2ogr.html
>
> -- Cheers Simon
>
> Simon Cropper - Open Content Creator
>
> Free and Open Source Software Workflow Guides
> ------------------------------------------------------------
> Introduction http://www.fossworkflowguides.com
> GIS Packages http://www.fossworkflowguides.com/gis
> bash / Python http://www.fossworkflowguides.com/scripting
>
>
>
>
Try updating you GDAL files. Also check to ensure you don't have files
on your system that are older that are higher up the system path than
the FWTools versions.
http://trac.osgeo.org/gdal/ticket/3796
Also from what I can tell there is a 10 charaxter limit on older
versions of ogr2ogr filenames. Name your files something else that is
shorter. Rename the files to something else after the conversion.
--
Cheers Simon
Simon Cropper - Open Content Creator
Free and Open Source Software Workflow Guides
------------------------------------------------------------
Introduction http://www.fossworkflowguides.com
GIS Packages http://www.fossworkflowguides.com/gis
bash / Python http://www.fossworkflowguides.com/scripting
More information about the Discuss
mailing list