[gdal-dev] support for Czech Exchange Format for Land Consolidation
Even Rouault
even.rouault at spatialys.com
Tue Sep 23 07:56:34 PDT 2014
Selon Martin Landa <landa.martin at gmail.com>:
> Hi all,
>
> together with colleague of mine we are thinking to add support to GDAL
> for the Czech Exchange Format of Land Consolidation. This format is
> XML-based, but unfortunately not a GML. Here is a small sample (just
> line segments):
>
> <zs>
> <plins>
> <plin typ="55">
> <lin>
> <segment xsi:type="v:se">
> <c x="1075053.92" y="591813.89" />
> <c x="1075055.75" y="591793.89" />
> </segment>
> </lin>
> </plin>
> <plin typ="55">
> <lin>
> <segment xsi:type="v:se">
> <c x="1075055.75" y="591793.89" />
> <c x="1075059.23" y="591777.01" />
> </segment>
> </lin>
> </plin>
> <plin typ="55">
> <lin>
> <segment xsi:type="v:se">
> <c x="1075059.23" y="591777.01" />
> <c x="1075058.48" y="591773.38" />
> </segment>
> </lin>
> </plin>
> </zs>
>
> I wonder if there is an easier way than to write a new GDAL driver
> from the scratch (using XML parser similarly to GML driver)...
Martin,
Although I've always felt intimated by its syntax, I imagine you could write a
XSLT document that would transform the above XML in GML. Easier solution is to
do it off-line (i.e. outside GDAL), otherwise if you want something transparent
to the user, we could have a generic XML driver that would try several XSLT
documents and then feed the transformed document to the GML driver. I don't
think we have already a dependency library that handle XSLT however. In
http://en.wikipedia.org/wiki/XSLT, I see libxslt mentionned as a possibility.
One point to check is if the libraries can do the transform in a streaming way
(SAX parsing) or if they must ingest the whole document (DOM), which could be a
limitating factor for big documents.
If you go with a from-the-scratch driver, I would not recommand to go from the
GML one which has become very complicated. GeoRSS or GPX are probably better
starting points.
Even
>
> Thanks in advance for any idea! Martin
>
> --
> Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list