[gdal-dev] GML / NAS code redundancy

Even Rouault even.rouault at mines-paris.org
Wed Mar 19 03:17:35 PDT 2014


Le mardi 18 mars 2014 23:04:56, Jukka Rahkonen a écrit :
> Even Rouault <even.rouault <at> mines-paris.org> writes:
> > Selon Martin Landa <landa.martin <at> gmail.com>:
> > > Hi,
> > > 
> > > 2014-03-18 17:50 GMT+01:00 Even Rouault <even.rouault <at> mines-
paris.org>:
> > > > I haven't looket at the file but from the above, the logic of the
> > > 
> > > application
> > > 
> > > > schema registry would need to be extended since it currently only
> > > > supports
> > > 
> > > one
> > > 
> > > > feature type per file. You would need to ingest the full file to
> > > > recognize
> > > 
> > > which
> > > 
> > > > feature types are in it.
> > > 
> > > there is probably some misunderstanding, at [1] there is mentioned
> > > Finish registry which contains different feature types
> > > (KiinteistorajanSijaintitiedot, PalstanTunnuspisteenSijaintitiedot,
> > > ...). It means that in the input file can be only one feature type not
> > > all of them?
> > 
> > Yes, as far as I remember there were only one feature type per file,
> > hence
> 
> this
> 
> > (non-fundamental) restriction in the code. I looked at bit at your sample
> 
> and I
> 
> > think you could just use the current code without changing it (well
> > perhaps increase the szHeader size). Add in the GML registry your
> > feature types
> 
> and make
> 
> > them point to the same .gfs file that define all the feature types ! The
> > only drawback is that you could have empty layers if not all feature
> > types are
> 
> found,
> 
> > but that should work OK otherwise.
> 
> Hi,
> 
> If you want to compare the data from National Land Survey of Finland you
> can find the schema for each feature type from page
> http://www.maanmittauslaitos.fi/aineistot-palvelut/rajapintapalvelut/kiinte
> istotietojen-kyselypalvelu-wfs/kayttoonotto/aineistot-tuo
> 
> Follow links "Tuotteen skeema". Data samples are available from page
> http://www.maanmittauslaitos.fi/aineistot-palvelut/rajapintapalvelut/kiinte
> istotietojen-kyselypalvelu-wfs/kayttoonotto/kyselyt-esime follow links
> "GML-vastaussanoma".
> 
> Each featuretype is separate but may contain many layers
> 
> C:\data\MML-GML>ogrinfo palstan_tietoja.gml
> Had to open data source read-only.
> INFO: Open of `palstan_tietoja.gml'
>       using driver `GML' successful.
> 1: RekisteriyksikonTietoja (None)
> 2: RekisteriyksikonPalstanTietoja (Unknown (any), Unknown (any))
> 3: KiinteistorajanTietoja
> 4: RajamerkinTietoja

Just for Martin's enlightment, the GML driver manages to recognize several 
layers in that case since the RekisteriyksikonTietoja is the top feature 
present in the first bytes of the file, and the other feature types are sub 
feature types, also defined in RekisteriyksikonTietoja.xsd. In the case, the 
schema were simple enough so that the XSD parser could understand them.

For Martin's case, I think that a .gfs will be necessary to extract properties 
in nested XML elements.

> 
> -Jukka Rahkonen-
> 
> 
> 
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list