<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 05/28/2013 05:34 PM, Lauri Kajan
wrote:<br>
</div>
<blockquote
cite="mid:CAKWoFM+hp4Ky+=f0K4H_X97D0xzi9rfa1q1t5cfgMVDJbfU-EQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Ari,
<div><br>
</div>
<div style="">I think that shouldn't be neccessary.</div>
<div style="">The gml file points to the xsd schema file (<a
moz-do-not-send="true"
href="http://xml.nls.fi/XML/Schema/Maastotietojarjestelma/MTK/201202/Maastotiedot.xsd">http://xml.nls.fi/XML/Schema/Maastotietojarjestelma/MTK/201202/Maastotiedot.xsd</a>).</div>
<div style="">In this schema those tags are defined to be
"aliases" for these known gml tags by using the
substitutionGroup. So actually that <Maastotiedot> is a
<gml:FeatureCollection>. Is this supported by OGR?</div>
</div>
</blockquote>
<br>
I think GDAL wants the xsd to be local file for GML files. However,
I tried this and I can see GDAL finding the xsd, but failing the
overall process. Further, it seems that GDAL does not recognize the
XML include tag.<br>
<br>
Anyway, I assume it is not a simple substitution as all features
should be wrapped into gml:featureMember elements.<br>
<br>
Ari<br>
<br>
<blockquote
cite="mid:CAKWoFM+hp4Ky+=f0K4H_X97D0xzi9rfa1q1t5cfgMVDJbfU-EQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div style=""><br>
</div>
<div style="">I'm not an xml/gml expert either so it's hard to
find the problem.</div>
<div style=""><br>
</div>
<div style="">-Lauri</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, May 28, 2013 at 5:11 PM, Ari
Jolma <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:ari.jolma@gmail.com" target="_blank">ari.jolma@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Lauri,<br>
<br>
There are at least these issues with the file:<br>
<br>
- Piste should be gml:Point<br>
- Murtoviiva should be gml:LineString<br>
- Alue should be gml:Polygon<br>
- all features should be wrapped into gml:featureMember
elements<br>
- everything should be in gml:FeatureCollection<br>
- complex geometries should be wrapped into
gml:GeometryCollection elements<br>
<br>
With these changes and limitations I can open (a small
piece) of the file with ogrinfo. All are probably
changeable by XSLT. Of course my knowledge about GML and
it's parsing in GDAL is limited, so take this with a
grain of salt.<br>
<br>
Cheers,<br>
<br>
Ari<br>
<br>
the changed piece:<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<gml:FeatureCollection xmlns:gml=<a
moz-do-not-send="true"
href="http://www.opengis.net/gml" target="_blank">"http://www.opengis.net/gml"</a>><br>
<harvatLouhikot><br>
<gml:featureMember><br>
<HarvaLouhikko gid="733051928"
dimension="3"><br>
<sijaintitarkkuus>10000</sijaintitarkkuus><br>
<korkeustarkkuus>100001</korkeustarkkuus><br>
<aineistolahde>1</aineistolahde><br>
<alkupvm>2005-11-15</alkupvm><br>
<suunta>0</suunta><br>
<sijainti><br>
<gml:Point><br>
<gml:pos
srsDimension="3">368845.895 7588505.642
308.292</gml:pos><br>
</gml:Point><br>
</sijainti><br>
<kohderyhma>13</kohderyhma><br>
<kohdeluokka>34200</kohdeluokka><br>
</HarvaLouhikko><br>
</gml:featureMember><br>
</harvatLouhikot><br>
<hietikot><br>
<gml:featureMember><br>
<Hietikko gid="775477697" dimension="3"><br>
<sijaintitarkkuus>5000</sijaintitarkkuus><br>
<aineistolahde>1</aineistolahde><br>
<alkupvm>2005-11-15</alkupvm><br>
<sijainti><br>
<gml:GeometryCollection><br>
<gml:geometryMember><br>
<gml:Point><br>
<gml:pos
srsDimension="3">368010.039 7584945.893
0.000</gml:pos><br>
</gml:Point><br>
</gml:geometryMember><br>
<gml:geometryMember><br>
<gml:Polygon><br>
<gml:exterior><br>
<gml:LinearRing><br>
<gml:posList
srsDimension="3">368000.000 7584931.821 370.229
368000.000 7584936.222 369.780 368001.115 7584941.126
368.906 368002.650 7584954.132 364.859 368002.478
7584969.653 361.051 368008.553 7584975.749 359.563
368016.839 7584970.791 359.517 368019.890 7584958.174
360.232 368023.171 7584944.026 362.917 368022.143
7584935.253 365.008 368016.168 7584924.893 368.340
368004.859 7584923.913 369.824 368000.000 7584931.821
370.229</gml:posList><br>
</gml:LinearRing><br>
</gml:exterior><br>
</gml:Polygon><br>
</gml:geometryMember><br>
</gml:GeometryCollection><br>
</sijainti><br>
<kohderyhma>64</kohderyhma><br>
<kohdeluokka>34300</kohdeluokka><br>
</Hietikko><br>
</gml:featureMember><br>
</hietikot><br>
</gml:FeatureCollection>
<div>
<div class="h5"><br>
<br>
<br>
On 05/28/2013 02:06 PM, Lauri Kajan wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">
<div>Hello everybody,</div>
<div><br>
</div>
<div>I have tired to read gml file from National
Land Suvey of Finnish without a success.</div>
<div>Does anybody have any idea what's the
problem?</div>
<div><br>
</div>
<div>The gml has a quite complex schema. Is this a
problem for ogr?</div>
<div>I have tried to download all the schema files
to the same folder with the same name than the
file but it doesn't work.</div>
<div><br>
</div>
<div><br>
</div>
<div>Here is a sample:</div>
<a moz-do-not-send="true"
href="https://docs.google.com/file/d/0BwbdYcPHdb1pOEs1eGNiZnBhMUk/edit?usp=sharing"
target="_blank">https://docs.google.com/file/d/0BwbdYcPHdb1pOEs1eGNiZnBhMUk/edit?usp=sharing</a>
<div> <br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div><br>
</div>
<div>Lauri Kajan</div>
<div>Software Developer</div>
<div><br>
</div>
<div>Karttakeskus Ltd.</div>
<div>Atomitie 2</div>
<div>00370 Helsinki</div>
<div>Finland</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
gdal-dev mailing list
<a moz-do-not-send="true" href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"
target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<br>
<br>
</body>
</html>