Layer.pm

Summary
Layer.pm
BE4::LayerDescribe a layer for a ROK4 server.
STRLYRTMPLTDefine the template XML for a layer
STRTKTMPLTDefine the template XML for the keywords part of a layer.
STRSRSTMPLTDefine the template XML for the SRS part of a layer.
DEFAULTDefine default values for optionnal attributes.
Constructors
newLayer constructor.
_initCheck and store layer’s attributes values.
Export methods
exportToXMLInsert layer’s attributes in the XML template.

BE4::Layer

Exporter
BE4::Layer

Describe a layer for a ROK4 server.

Using

use BE4::Layer;

# Layer object creation
my $objLayer = new BE4::Layer({
    title            => "Ortho IGN en RAW",
    abstract         => "Projection native",
    keywordlist      => ["key","word"],
    style            => "normal",
    minRes           => 0.5,
    maxRes           => 1,
    opaque           => 1,
    authority        => "IGNF",
    srslist          => [ "IGNF:LAMB93","IGNF:RGF93G"],
    resampling       => "lanczos_4",
    geo_bbox         => [0,40,10,50],
    proj             => "IGNF:LAMB93",
    proj_bbox        => [805888,6545408,806912,6546432],
    pyramid          => "/pyramids/ORTHO.pyr",
});

my $XMLlayer = $objLayer->exportToXML();

Attributes

titlestring - Layer’s name.
abstractstring - Abstract, to resume the layer content.
keywordliststring array - List of keywords.
stylestring - Layer’s style.
minresfloat - Minimal resolution of the pyramid.
maxresfloat - Maximal resolution of the pyramid.
opaqueboolean - 1 by default.
authoritystring - SRS’s authority : IGNF:LAMB93 -> IGNF.
srsliststring array - List of available SRS for the layer.
resamplingstring - Used interpolation to generate images used by this layer.
geo_bboxdouble array - [minx,miny,maxx,maxy] in WGS84G.
projstring - Data native projection.
proj_bboxdouble array - [minx,miny,maxx,maxy] in pyramid’s SRS.
pyramidstring - Pyramid’s descriptor path.
Summary
STRLYRTMPLTDefine the template XML for a layer
STRTKTMPLTDefine the template XML for the keywords part of a layer.
STRSRSTMPLTDefine the template XML for the SRS part of a layer.
DEFAULTDefine default values for optionnal attributes.
Constructors
newLayer constructor.
_initCheck and store layer’s attributes values.
Export methods
exportToXMLInsert layer’s attributes in the XML template.

STRLYRTMPLT

my $STRLYRTMPLT

Define the template XML for a layer

STRTKTMPLT

my $STRTKTMPLT

Define the template XML for the keywords part of a layer.

STRSRSTMPLT

my $STRSRSTMPLT

Define the template XML for the SRS part of a layer.

DEFAULT

my %DEFAULT

Define default values for optionnal attributes.

Constructors

new

sub new

Layer constructor.  Bless an instance.

Parameters (hash)

titlestring
abstractstring - Optionnal, empty string by default.
keywordliststring array - Optionnal, empty array by default.
stylestring - Optionnal, “normal” by default.
minresfloat - Optionnal, 0.0 by default.
maxresfloat - Optionnal, 0.0 by default.
opaqueboolean - Optionnal, 1 by default.
authoritystring - Optionnal, “IGNF” by default.
srsliststring array
resamplingstring - Optionnal, “lanczos_4” by default.
geo_bboxdouble array
projstring - Optionnal, first element of srslist by default.
proj_bboxdouble array
pyramidstring

See also

_init

_init

sub _init

Check and store layer’s attributes values.

Parameters (hash)

titlestring
abstractstring - Optionnal, empty string by default.
keywordliststring array - Optionnal, empty array by default.
stylestring - Optionnal, “normal” by default.
minresfloat - Optionnal, 0.0 by default.
maxresfloat - Optionnal, 0.0 by default.
opaqueboolean - Optionnal, 1 by default.
authoritystring - Optionnal, “IGNF” by default.
srsliststring array
resamplingstring - Optionnal, “lanczos_4” by default.
geo_bboxdouble array
projstring - Optionnal, first element of srslist by default.
proj_bboxdouble array
pyramidstring

Export methods

exportToXML

sub exportToXML

Insert layer’s attributes in the XML template.

Returns a string to XML format.

Example

<layer>
    <title>Ortho IGN en RAW</title>
    <abstract>Projection native</abstract>
    <keywordList>
        <keyword>key</keyword>
        <keyword>word</keyword>
    </keywordList>
    <style>normal</style>
    <minRes>0.5</minRes>
    <maxRes>1</maxRes>
    <EX_GeographicBoundingBox>
        <westBoundLongitude>0</westBoundLongitude>
        <eastBoundLongitude>10</eastBoundLongitude>
        <southBoundLatitude>40</southBoundLatitude>
        <northBoundLatitude>50</northBoundLatitude>
    </EX_GeographicBoundingBox>
    <WMSCRSList>
        <WMSCRS>IGNF:LAMB93</WMSCRS>
        <WMSCRS>IGNF:RGF93G</WMSCRS>
    </WMSCRSList>
    <boundingBox CRS="IGNF:LAMB93" minx="805888" miny="6545408" maxx="806912" maxy="6546432"/>
    <opaque>true</opaque>
    <authority>IGNF</authority>
    <resampling>lanczos_4</resampling>
    <pyramidList>
        <pyramid>/pyramids/ORTHO.pyr</pyramid>
    </pyramidList>
</layer>
my $STRLYRTMPLT
Define the template XML for a layer
my $STRTKTMPLT
Define the template XML for the keywords part of a layer.
my $STRSRSTMPLT
Define the template XML for the SRS part of a layer.
my %DEFAULT
Define default values for optionnal attributes.
sub new
Layer constructor.
sub _init
Check and store layer’s attributes values.
sub exportToXML
Insert layer’s attributes in the XML template.
Close