 |
|
| |
Geo::GML(3) |
User Contributed Perl Documentation |
Geo::GML(3) |
Geo::GML - Geography Markup Language processing
Geo::GML has extra code in
Geo::GML::GeoPoint
Geo::GML
is a XML::Compile::Cache
is a XML::Compile::Schema
is a XML::Compile
use Geo::GML ':gml321';
my $gml = Geo::GML->new('READER', version => '3.2.1');
# see XML::Compile::Cache on how to use readers and writers
my $data = $gml->reader("gml:GridCoverage")->($xmlmsg);
my $xml = $gml->writer($sometype)->($doc, $perldata);
# or without help of the cache, XML::Compile::Schema
my $r = $gml->compile(READER => $sometype);
my $data = $r->($xml);
# super simple
my ($type, $data) = Geo::GML->from('data.xml');
# overview (large) on all defined elements
$gml->printIndex;
# To discover the perl datastructures to be passed
print $gml->template("gml:Surface");
# autoloaded logic to convert Geo::Point into GML
$data->{...somewhere...} = $gml->GPtoGML($objects);
Provides access to the GML definitions specified in XML. The
details about GML structures can differ, and therefore you should be
explicit which versions you understand and produce.
If you need the <b>most recent</b> version of GML,
then you get involved with the ISO19139 standard. See CPAN module
Geo::ISO19139.
When you need GML3.3 features, then please contact me
Extends "DESCRIPTION" in XML::Compile::Cache.
Extends "METHODS" in XML::Compile::Cache.
Extends "Constructors" in XML::Compile::Cache.
- Geo::GML->from($xmldata,
%options)
- 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/read_gml.pl
example:
my ($type, $data) = Geo::GML->from('data.xml');
- Geo::GML->new('READER'|'WRITER'|'RW',
%options)
-
-Option --Defined in --Default
allow_undeclared <true>
any_element XML::Compile::Cache ATTEMPT
block_namespace XML::Compile::Schema []
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 []
parser_options XML::Compile <many>
prefixes undef
schema_dirs XML::Compile undef
typemap XML::Compile::Cache {}
version <required>
xsi_type XML::Compile::Cache {}
Extends "Accessors" in XML::Compile::Cache.
- $obj->addHook($hook|LIST|undef)
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addHooks( $hook, [$hook, ...] )
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addKeyRewrite($predef|CODE|HASH, ...)
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addSchemaDirs(@directories|$filename)
- Geo::GML->addSchemaDirs(@directories|$filename)
- Inherited, see "Accessors" in XML::Compile
- $obj->addSchemas($xml, %options)
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addTypemap(PAIR)
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addTypemaps(PAIRS)
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->addXsiType( [HASH|ARRAY|LIST] )
- Inherited, see "Accessors" in XML::Compile::Cache
- $obj->allowUndeclared( [BOOLEAN] )
- Inherited, see "Accessors" in XML::Compile::Cache
- $obj->anyElement('ATTEMPT'|'SLOPPY'|'SKIP_ALL'|'TAKE_ALL'|CODE)
- Inherited, see "Accessors" in XML::Compile::Cache
- $obj->blockNamespace($ns|$type|HASH|CODE|ARRAY)
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->direction()
- Returns 'READER', 'WRITER', or 'RW'.
- $obj->hooks( [<'READER'|'WRITER'>] )
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->typemap( [HASH|ARRAY|PAIRS] )
- Inherited, see "Accessors" in XML::Compile::Cache
- $obj->useSchema( $schema, [$schema, ...] )
- Inherited, see "Accessors" in XML::Compile::Schema
- $obj->version()
- GML version, for instance '3.2.1'.
Extends "Prefix management" in XML::Compile::Cache.
- $obj->addNicePrefix(BASE, NAMESPACE)
- Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->addPrefixes( [PAIRS|ARRAY|HASH] )
- Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->learnPrefixes($node)
- Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->prefix($prefix)
- Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->prefixFor($uri)
- Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->prefixed( $type|<$ns,$local> )
- Inherited, see "Prefix management" in XML::Compile::Cache
- $obj->prefixes( [$params] )
- Inherited, see "Prefix management" in XML::Compile::Cache
Extends "Compilers" in XML::Compile::Cache.
- $obj->addCompileOptions( ['READERS'|'WRITERS'|'RW'], %options
)
- Inherited, see "Compilers" in XML::Compile::Cache
- $obj->compile( <'READER'|'WRITER'>, $type, %options )
- Inherited, see "Compilers" in XML::Compile::Schema
- $obj->compileAll( ['READERS'|'WRITERS'|'RW', [$ns]] )
- Inherited, see "Compilers" in XML::Compile::Cache
- $obj->compileType( <'READER'|'WRITER'>, $type, %options
)
- Inherited, see "Compilers" in XML::Compile::Schema
- $obj->dataToXML($node|REF-XML|XML-STRING|$filename|$fh|$known)
- Geo::GML->dataToXML($node|REF-XML|XML-STRING|$filename|$fh|$known)
- Inherited, see "Compilers" in XML::Compile
- $obj->initParser(%options)
- Geo::GML->initParser(%options)
- Inherited, see "Compilers" in XML::Compile
- $obj->reader($type|$name, %options)
- Inherited, see "Compilers" in XML::Compile::Cache
- $obj->template('PERL'|'XML', $type, %options)
- See XML::Compile::Schema::template(). This will create an example
of the data-structure based on GML. All %options
are passed to the template generator, the only reason to have this method,
is to avoid the need to collect all the GML XML files yourself.
-Option --Defined in --Default
abstract_types XML::Compile::Schema 'ERROR'
attributes_qualified XML::Compile::Schema <undef>
elements_qualified XML::Compile::Schema <undef>
include_namespaces XML::Compile::Schema <true>
indent XML::Compile::Schema " "
key_rewrite XML::Compile::Schema []
show_comments XML::Compile::Schema ALL
skip_header XML::Compile::Schema <false>
example:
use Geo::GML;
use Geo::GML::Util qw/NS_GML_321/;
use XML::Compile::Util qw/pack_type/;
my $gml = Geo::GML->new(version => NS_GML_321);
# to simplify the output, reducing often available large blocks
my @types = qw/gml:MetaDataPropertyType gml:StringOrRefType
gml:ReferenceType/;
my %hook = (type => \@collapse_types, replace => 'COLLAPSE');
# generate the data-structure
my $type = 'gml:RectifiedGridCoverage'; # any element name
print $gml->template(PERL => $type, hook => \%hook);
- $obj->writer($type|$name)
- Inherited, see "Compilers" in XML::Compile::Cache
- $obj->GPtoGML($object, %options)
- Inherited, see "Helpers" in Geo::GML::GeoPoint
Extends "Administration" in XML::Compile::Cache.
- $obj->declare( <'READER'|'WRITER'|'RW'>,
<$type|ARRAY>, %options )
- Inherited, see "Administration" in XML::Compile::Cache
- $obj->doesExtend($exttype, $basetype)
- Inherited, see "Administration" in XML::Compile::Schema
- $obj->elements()
- Inherited, see "Administration" in XML::Compile::Schema
- $obj->findName($name)
- Inherited, see "Administration" in XML::Compile::Cache
- $obj->findSchemaFile($filename)
- Geo::GML->findSchemaFile($filename)
- Inherited, see "Administration" in XML::Compile
- $obj->importDefinitions($xmldata, %options)
- Inherited, see "Administration" in XML::Compile::Schema
- $obj->knownNamespace($ns|PAIRS)
- Geo::GML->knownNamespace($ns|PAIRS)
- Inherited, see "Administration" in XML::Compile
- $obj->namespaces()
- Inherited, see "Administration" in XML::Compile::Schema
- $obj->printIndex( [$fh], %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 $fh is the default to print to.
-Option --Defined in --Default
show_declared XML::Compile::Cache <true>
- $obj->types()
- Inherited, see "Administration" in XML::Compile::Schema
- $obj->walkTree($node, CODE)
- Inherited, see "Administration" in XML::Compile
Extends "DETAILS" in XML::Compile::Cache.
Extends "DESCRIPTIONS" in XML::Compile::Cache.
This module is part of Geo-GML distribution version 0.18, built on
January 19, 2018. Website: http://perl.overmeer.net/CPAN/
Copyrights 2008-2018 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
http://dev.perl.org/licenses/
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc.
|