[gdal-dev] Re: GML 3.1.1

Ari Jolma ari.jolma at gmail.com
Wed Sep 15 04:51:27 EDT 2010

On 09/14/2010 09:19 PM, Mark Overmeer wrote:
> * Ari Jolma (ari.jolma at gmail.com) [100914 15:37]:
>> Would it make sense to use Geo::GDAL (i.e., the Perl interface to GDAL)
>> for i/o data to GDAL and from there to any GDAL supported format or just
>> for use within GDAL?
> Geo::GML translates XML (in this case representing GML data) into
> Perl's nested HASHes and ARRAYs with the same structure (while
> validating)  And the reverse: write GML.
>> I.e. the pipeline would thus be:
>> GML(doc)<->  Geo::GML<->  Geo::GDAL<->  GDAL<->  any OGR format
> I do not understand this. Geo::GDAL/GDAL is an application, where
> GML and OGR are formats.  So, it would be something like:
>      Geo::GML->read($gml_doc)->Geo::GDAL::ogr_or_something($outfile)
>                                    libGDAL
> I have no idea how the data needs to be organized to be accepted
> by the Geo::GDAL functions.

To write data into an OGR supported format (in-memory is also a format), 
you'd need to create a data source, then a layer, and then insert 
features into the layer. There are a few ways to actually do this. That 
should not be very difficult, I'd just need to know how that data is 
accessed from Geo::GML, which is in the docs I assume.

I'm wondering if Geo::GDAL should check for the availability of Geo::GML 
and if it is there, then do what? Enable a method to create a GDAL 
vector data source with the help of Geo::GML and a method to save a data 
source into GML with the help of Geo::GML? I'm not sure what are the 
issues between different versions of GML vs the data model for vector 
data in OGR.


More information about the gdal-dev mailing list