[gdal-dev] ogr2ogr convert e00 to shp
Murat Beyhan
muratbeyhan28 at gmail.com
Sun Feb 17 12:49:23 PST 2013
Thanks for the great explanation and help,
But still I couldn't solve my problem. Shape file which is generated by
ogr2ogr should be under the working directory as a file not as a fiel under
the new directory. I mean after run the command
I would like to see shape file under the working directory
f30c3.shp
f30c3.shx
f30c3.dbf
This could be done by old version but for new one as I explain it created
new directory and collect files under that directory..
I have written another script and it read data under working directory. So
I have to see files under the working directory.
Regards
Murat
2013/2/16 Eli Adam <eadam at co.lincoln.or.us>
> On Fri, Feb 15, 2013 at 1:25 PM, Murat Beyhan <muratbeyhan28 at gmail.com>
> wrote:
> > Dear All,
> > I deleted existing shp file and I try but It doesn't create individual
> shp
> > file under same directory. Always creates files under directory
> >
> > avcimport f30c3.e00 f30c3
> > ogr2ogr -f "ESRI Shapefile" f30c3.shp f30c3
> > this creates file under directory of f30c3.shp and files as same before I
> > wrote.
> >
> > ls f30c3.shp/
> > ARC.dbf ARC.shp ARC.shx LAB.dbf LAB.shp LAB.shx
>
> Coverages, http://gdal.org/ogr/drv_avce00.html, can have multiple
> different geometry types within one file. It looks like your results
> include both lines and labels. A shapefile can not have multiple
> geometries within one shapefile so at least one of the output
> shapefiles can't have the same name. In this case ogr2ogr is
> generating one for lines (ARC.shp) and one for labels (LAB.shp). This
> is probably also one of the reasons that the shapefile driver treats a
> directory as a dataset and shapefiles as layers within that
> 'dataset/directory'
>
> Best Regards, Eli
>
>
> >
> >
> > Then I also used without using coverage file created by avcimport
> > I have deleted f30c3 coverage directory and files created by the first
> > method then apply following directly
> > ogr2ogr -f "ESRI Shapefile" f30c3.shp f30c3.e00
> > this also created directory for the shape file.
> >
> > it works and behave similar with previous process
> > I have faced this problem for new version of Gdal Eli.
> > old version works fine with mandriva but new version of gdal on ubuntu
> > behave like this. So I really waiting for the solution of this issue.
> >
> >
> >
> > 2013/2/15 Eli Adam <eadam at co.lincoln.or.us>
> >>
> >> Murat,
> >>
> >> > I was creating shp file using ogr2ogr as follows
> >> >
> >> > avcimport file.e00 coverage
> >> >
> >> > ogr2ogr -f "ESRI Shapefile" file.shp coverage
> >> >
> >> > This was worked well for old version of gdal
> >> >
> >> > I have installed gdal 1.9 then I have faced such a problem
> >> >
> >> > the ogr2ogr command create a directory and shp file located unter that
> >> > directory.
> >> > But old version of ogr2ogr was created files under the same directory
> >> > where
> >> > you work
> >>
> >> I think that ogr2ogr has (sometimes) created shapefiles in directories
> >> for a long time before 1.9.
> >>
> >> >
> >> > the old version of ogr2ogr creates file.shp file.shx file.dbf
> >> >
> >> > but new version create directory under working directory called
> file.shp
> >> > instead of file.shp file
> >> > and the shp files located under file.shp directory
> >> >
> >> > Please let me know what is differs this resuts.
> >> >
> >> > Regards
> >> > Murat
> >>
> >> The shapefile driver page talks about this some,
> >> http://gdal.org/ogr/drv_shapefile.html
> >>
> >> I notice similar things (this is with PostGIS datasource). If the
> >> output shp file is the same name as input source then the shp is
> >> created in the specified directory. If it is a different name, then I
> >> get a directory.
> >>
> >> ogr2ogr
> V:\Data\E_addendum\Assessor\2012\nbhd\nbhd_codes_2012_postgis2.shp
> >> PG:"host=123.12.12.12 user=username dbname=mydatabase
> >> password=mypassword" taxlots2012_union_valid_nbhd_codes_v1 -a_srs
> >> "EPSG:2913"
> >>
> >> creates a directory and then the shp (and the shp has the name of the
> >> original datasource), i.e.
> >>
> >>
> V:\Data\E_addendum\Assessor\2012\nbhd\nbhd_codes_2012_postgis2.shp\taxlots2012_union_valid_nbhd_codes_v1.dbf,
> >> .shp, etc
> >>
> >> ogr2ogr
> >>
> V:\Data\E_addendum\Assessor\2012\nbhd\taxlots2012_union_valid_nbhd_codes_v1.shp
> >> PG:"host=123.12.12.12 user=username dbname=mydatabase_template
> >> password=mypassword" taxlots2012_union_valid_nbhd_codes_v1 -a_srs
> >> "EPSG:2913"
> >>
> >> creates the named shp in the directory.
> >>
> >> I have occasionally found this a minor annoyance. Is there a config
> >> or creation option to change this? A search of the email archives
> >> didn't turn anything up for me.
> >>
> >> Eli
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130217/7664968d/attachment.html>
More information about the gdal-dev
mailing list