View on
Mark Overmeer > Geo-EOP-0.13 > Geo::EOP



Annotate this POD

View/Report Bugs
Module Version: 0.13   Source   Latest Release: Geo-EOP-0.50


Geo::EOP - Earth Observation Products EOP


   is a Geo::GML
   is a XML::Compile::Cache
   is a XML::Compile::Schema
   is a XML::Compile


 use Geo::EOP ':eop1.1';

 my $eop = Geo::EOP->new(eop_version => '1.1');

 # see XML::Compile::Cache on how to use readers and writers
 my $data = $eop->reader("gml:GridCoverage")->($xmlmsg);
 my $xml  = $eop->writer($sometype)->($doc, $perldata);

 # or without help of the cache, XML::Compile::Schema
 my $r    = $gml->compile(READER => $sometype);
 my $data = $r->($xml);

 # read a eop data file.  Autodetects the version used.
 my ($type, $data) = Geo::EOP->from('data.xml');
 print "Root type:   $type\n";
 print "EOP version: $data->{version}\n";

 # huge overview on all defined elements


Provides access to the EOP definitions specified as XML schemas, based on GML. Up to version 1.0, these schemas where named 'HMA' (Heterogeneous EO Missions Accessibility), and the development is still part of these ESA efforts for standardization.

BE WARNED that HMA1.0 and EOP 1.1/1.2 are only using a subset of GML version 3.1.1, due to problems with some software tools. This limitation will probably be removed in 1.3 (or whatever the next version will be named).

The first releases of this module will not powerful, but hopefully people contribute. For instance, an example conversion script between various versions is very welcome! It would be nice to help each other. I will clean-up the implementation, to make it publishable, but do not have the knowledge about needed to implement the converter itself.




Read a EOP structure from a data source, which can be anything acceptable by dataToXML(): a XML::LibXML::Element, XML as string or ref-string, filename, filehandle or known namespace.

Returned is the product (the type of the root node) and the parsed data-structure. The EOP version used for decoding is autodetected, unless specified.

See examples/


  my ($type, $data) = Geo::EOP->from('data.xml');


 Option            --Defined in     --Default
 allow_undeclared    Geo::GML         <true>
 any_element         XML::Compile::Cache  ATTEMPT
 eop_version                          <required>
 hook                XML::Compile::Schema  undef
 hooks               XML::Compile::Schema  []
 ignore_unused_tags  XML::Compile::Schema  <false>
 key_rewrite         XML::Compile::Schema  []
 opts_readers        XML::Compile::Cache  []
 opts_rw             XML::Compile::Cache  <some>
 opts_writers        XML::Compile::Cache  []
 prefixes            Geo::GML         undef
 schema_dirs         XML::Compile     undef
 typemap             XML::Compile::Schema  {}
 units                                <none>
 version             Geo::GML         <required>

. allow_undeclared => BOOLEAN

. any_element => CODE|'TAKE_ALL'|'SKIP_ALL'|'ATTEMPT'

. eop_version => VERSION|NAMESPACE

Only used when the object is created directly from this base-class. It determines which EOP syntax is to be used. Can be a VERSION like "1.1" or a NAMESPACE URI like 'NS_EOP_11'.


. hooks => ARRAY-OF-HOOK

. ignore_unused_tags => BOOLEAN|REGEXP

. key_rewrite => HASH|CODE|ARRAY-of-HASH-and-CODE

. opts_readers => HASH|ARRAY-of-PAIRS

. opts_rw => HASH|ARRAY-of-PAIRS

. opts_writers => HASH|ARRAY-of-PAIRS

. prefixes => ARRAY|HASH


. typemap => HASH

. units => HASH

See "Units". Only if you specify your preference in units of measurement, some automatic translations will be performed.




See "Accessors" in XML::Compile::Schema

$obj->addHooks(HOOK, [HOOK, ...])

See "Accessors" in XML::Compile::Schema

$obj->addKeyRewrite(CODE|HASH, CODE|HASH, ...)

See "Accessors" in XML::Compile::Schema



See "Accessors" in XML::Compile

$obj->addSchemas(XML, OPTIONS)

See "Accessors" in XML::Compile::Schema


See "Accessors" in XML::Compile::Schema


See "Accessors" in XML::Compile::Schema


See "Accessors" in XML::Compile::Cache


See "Accessors" in Geo::GML


EOP/HMA version, for instance '1.0'.


See "Accessors" in XML::Compile::Schema


See "Accessors" in XML::Compile::Cache


See "Accessors" in XML::Compile::Cache


See "Accessors" in XML::Compile::Cache

$obj->useSchema(SCHEMA, [SCHEMA])

See "Accessors" in XML::Compile::Schema


See "Accessors" in Geo::GML


$obj->compile(('READER'|'WRITER'), TYPE, OPTIONS)

See "Compilers" in XML::Compile::Schema

$obj->compileAll(['READER'|'WRITER'|'RW', [NAMESPACE]])

See "Compilers" in XML::Compile::Cache


See "Compilers" in XML::Compile

$obj->reader(TYPE|NAME, OPTIONS)

See "Compilers" in XML::Compile::Cache

$obj->template('PERL'|'XML', TYPE, OPTIONS)

See "Compilers" in Geo::GML


See "Compilers" in XML::Compile::Cache



See "Helpers" in Geo::GML::GeoPoint



See "Administration" in XML::Compile::Cache


See "Administration" in XML::Compile::Schema


See "Administration" in XML::Compile::Cache



See "Administration" in XML::Compile

$obj->importDefinitions(XMLDATA, OPTIONS)

See "Administration" in XML::Compile::Schema



See "Administration" in XML::Compile


See "Administration" in XML::Compile::Schema

$obj->printIndex([FILEHANDLE], OPTIONS)

List all the elements which can be produced with the schema. By default, this only shows the elements and excludes the abstract elements from the list. The selected FILEHANDLE is the default to print to.

 Option       --Defined in         --Default
 show_declared  XML::Compile::Cache  <true>

. show_declared => BOOLEAN


See "Administration" in XML::Compile::Schema

$obj->walkTree(NODE, CODE)

See "Administration" in XML::Compile



GML is careful about its units, which is nice but verbose. Therefore, this module gives you a way to set your preferences. The reader will simplify the structure, re-calculating the values found into the units of measure you prefer, according to UCUM (

  my $eop = Geo::EOP->new(...
     , units => { distance => 'm'
                , angle    => 'deg' }

Available conversions:

angle 'deg'|'rad'

Will be applied to all AngleType elements

distance 'm'

Will be applied to all MeasureType elements

percentage '%'|'float'

Will be applied to all elements with a name ending on "Percentage". I am not sure about the float... cannot find the uom name.


Error: cannot find pre-installed name-space files

Use $ENV{SCHEMA_LOCATION} or new(schema_dirs) to express location of installed name-space files, which came with the XML::Compile distribution package.

Error: don't known how to interpret XML data


This module is part of Geo-EOP distribution version 0.13, built on January 29, 2009. Website: All modules in this suite: "Geo::GML", "Geo::ISO19139", "Geo::EOP", "Geo::Point", "Geo::Proj4", "Geo::WKT", and "Math::Polygon".

Please post questions or ideas to|the Geo-Perl mailinglist


License of the CODE

Copyrights of the perl code and the related documentation by 2008-2009 by Mark Overmeer. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See

License of the SCHEMAS

The included schemas are copyrighted by the Open Geospatial Consortium, Inc. They are unmodified copied from the files at Read OGCs disclaimer and copyright statements on documentation and software at The license text is also included in this CPAN distribution.

syntax highlighting: