EOX GitLab Instance
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Martin Paces
metadata
Commits
5f84b3f1
Commit
5f84b3f1
authored
Mar 10, 2014
by
Martin Paces
Browse files
New element factories for eop:browse and eop:product.
parent
cb0592e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
ns_eop20.py
View file @
5f84b3f1
...
...
@@ -143,14 +143,56 @@ def getFootprint( geom ):
return
E
.
Footprint
(
gml
.
getId
(),
getMultiExtentOf
(
geom
,
"EPSG:4326"
))
def
get
Mask
(
type
,
format
,
srs
,
geom
=
None
,
url
=
None
,
post
=
None
)
:
def
get
Browse
(
type
,
srs
,
url
,
subtype
=
None
)
:
tmp
=
[
E
.
type
(
type
)
,
E
.
format
(
format
)
,
]
if
subtype
:
tmp
.
append
(
E
.
subType
(
subtype
))
ex_srs
=
"urn:ogc:def:crs:EPSG:6.3:%s"
%
(
srs
.
split
(
':'
)[
-
1
]
)
tmp
.
append
(
E
.
referenceSystemIdentifier
(
ex_srs
,{
"codeSpace"
:
"EPSG"
})
)
tmp
.
append
(
E
.
fileName
(
ows
.
getServiceReference
(
url
)))
return
E
.
browse
(
E
.
BrowseInformation
(
*
tmp
)
)
def
getProduct
(
srs
,
url
,
version
=
None
,
size
=
None
,
timeliness
=
None
):
tmp
=
[]
if
srs
:
ex_srs
=
"urn:ogc:def:crs:EPSG:6.3:%s"
%
(
srs
.
split
(
':'
)[
-
1
]
)
tmp
.
append
(
E
.
referenceSystemIdentifier
(
ex_srs
,{
"codeSpace"
:
"EPSG"
})
)
tmp
.
append
(
E
.
fileName
(
ows
.
getServiceReference
(
url
)))
if
version
:
tmp
.
append
(
E
.
version
(
version
)
)
if
size
:
tmp
.
append
(
E
.
size
(
size
)
)
if
timeliness
:
tmp
.
append
(
E
.
timeliness
(
timeliness
)
)
tmp
.
append
(
E
.
fileName
(
ows
.
getServiceReference
(
url
)))
return
E
.
product
(
E
.
ProductInformation
(
*
tmp
)
)
def
getMask
(
type
,
format
,
srs
=
None
,
geom
=
None
,
url
=
None
,
post
=
None
,
subtype
=
None
):
tmp
=
[
E
.
type
(
type
)
,
E
.
format
(
format
)
,
]
if
subtype
:
tmp
.
append
(
E
.
subType
(
subtype
))
if
srs
:
ex_srs
=
"urn:ogc:def:crs:EPSG:6.3:%s"
%
(
srs
.
split
(
':'
)[
-
1
]
)
tmp
.
append
(
E
.
referenceSystemIdentifier
(
ex_srs
,{
"codeSpace"
:
"EPSG"
})
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment