[Qgis-user] Re:Newbie question - gml files

Sam Vekemans acrosscanadatrails at gmail.com
Sun Jan 2 14:58:57 PST 2011


Hi,

On Sun, Jan 2, 2011 at 2:23 PM, Alex Mandel <tech_dev at wildintellect.com>wrote:

> Let's try taking a couple steps back.
>
> Which method did you use to install the QGIS? Standalone or OSGeo4W or
> Source Compiled(which compiler)
> Can you post a link to a sample GML file for others to test?
>
>
I used the download link from the qgis.org website :)
http://qgis.org/downloads/QGIS-OSGeo4W-1.6.0-14615-Setup-2.exe
... and that's the one that didn't open up.

http://download.osgeo.org/qgis/win32/
http://download.osgeo.org/qgis/win32/QGIS-1.3.0-3-No-GrassSetup.exe
installed just fine




> ogrinfo and ogr2ogr are tools to help test if the problem is with the
> gml file. QGIS at it's core uses the same libraries to open gml files
> and that's what makes it a good test.
>

The .gml files are here
http://ftp2.cits.rncan.gc.ca/pub/canvec/province_gml/nl/
(all of these need to be turned to .shp files)

The program ogr2ogr.exe worked, using the simple instructions that  aperi2007
provided

title big_bad_ogr2ogr
cd\
d:
cd\try-gdal
pause
ogr2ogr.exe -f "ESRI Shapefile" d:\try-gdal NL_LX.gml

it took some time to number crunch, but it did make a whole bunch of .shp
files :) ... accept the projection is still off.
So i need to add "EPSG : 4617"   or some random 4 digit number that will
work.

ogr2ogr.exe -f "ESRI Shapefile" -t_srs EPSG:4617 d:\try3-gdal NL_LX.gml

What i dont know is exactly which projection code to use or the prefix to
use for it. http://www.gdal.org/ogr2ogr.html assumes that the user already
knows how to use the program :)
... if i get this right then there is no need to mess with qgis :-)

cheers,
sam


> Thanks,
> Alex
>
> On 01/02/2011 12:50 PM, Sam Vekemans wrote:
> > Ok, i tried the big bad ogr2ogr.exe and got an error
> >
> >
> http://picasaweb.google.com/lh/photo/jBGtPGH81IaE3YFb5Tf70A?feat=directlink
> >
> >
> > And the link on the wiki is broken :(
> > http://www.qgis.org/wiki/Ogr2ogr
> >
> > Could anyone explain 'what' this problem actually is? ... is it the way
> that
> > i am opening up the .gml file from qgis?
> > I think that i need to set the project 'projection'  1st.   And i think i
> > did that, setting it to 'NAD83 (CSRS) EPSG : 4617'
> > so it says "+proj=longlat +ellps=GRS80 +no_defs"
> > ...  the .shp file opens up with the right projection.
> >
> > And apparently qgis 'should' be able to open up this .gml file without
> using
> > ogr2ogr.exe
> >
> > I think it's because i dont have postGISgrass or ArcGIS? installed, or
> > perhaps it's some python library file which is not installed correctly?
> >
> > Thanks,
> > Sam
> >
> > On Sun, Jan 2, 2011 at 11:44 AM, Andrea Peri <aperi2007 at gmail.com>
> wrote:
> >
> >>> P.S, if anyone is bored, my task is rather simple.
> >>> Download all of the canvec .gml files, then convert them to .shp format
> >>> and save each map feature as a separate .shp file (province size)
> >>
> >>
> >>
> >>> ... then zip and upload it to some website, like mediafire.com or any
> other
> >>
> >>> file sharing site.
> >>
> >> Hi,
> >>
> >> you could try with gdal/ogr.
> >>
> >> I think the last version is capable to convert GML.
> >>
> >> ogr2ogr.exe -f "ESRI Shapefile" folder-result file.gml
> >>
> >>
> >> Regards,
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110102/b339dfaf/attachment.html>


More information about the Qgis-user mailing list