Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Mapserver REST API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Miscellaneous
Mapserver REST API
Commits
142a4987
Commit
142a4987
authored
6 years ago
by
m431m
Browse files
Options
Downloads
Patches
Plain Diff
Improved data sql request (with srid, with unique)
parent
02ca84e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mra.py
+12
-1
12 additions, 1 deletion
src/mra.py
with
12 additions
and
1 deletion
src/mra.py
+
12
−
1
View file @
142a4987
...
@@ -291,6 +291,9 @@ class Mapfile(MetadataMixin):
...
@@ -291,6 +291,9 @@ class Mapfile(MetadataMixin):
self
.
ms
.
setProjection
(
"
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
"
)
self
.
ms
.
setProjection
(
"
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
"
)
self
.
ms
.
setExtent
(
-
180
,
-
90
,
180
,
90
)
self
.
ms
.
setExtent
(
-
180
,
-
90
,
180
,
90
)
self
.
ms
.
units
=
mapscript
.
MS_DD
self
.
ms
.
units
=
mapscript
.
MS_DD
self
.
set_metadata
(
"
ows_title
"
,
"
OGC Web Service
"
)
self
.
set_metadata
(
"
ows_srs
"
,
"
EPSG:4326
"
)
for
ows
in
(
"
wms
"
,
"
wfs
"
,
"
wcs
"
):
for
ows
in
(
"
wms
"
,
"
wfs
"
,
"
wcs
"
):
self
.
set_metadata
(
"
%s_enable_request
"
%
ows
,
""
)
self
.
set_metadata
(
"
%s_enable_request
"
%
ows
,
""
)
else
:
else
:
...
@@ -446,6 +449,11 @@ class FeatureTypeModel(LayerModel):
...
@@ -446,6 +449,11 @@ class FeatureTypeModel(LayerModel):
connection
+=
"
"
.
join
(
"
%s=%s
"
%
(
p
,
cparam
[
p
])
for
p
in
[
"
user
"
,
"
password
"
]
if
p
in
cparam
)
connection
+=
"
"
.
join
(
"
%s=%s
"
%
(
p
,
cparam
[
p
])
for
p
in
[
"
user
"
,
"
password
"
]
if
p
in
cparam
)
self
.
ms
.
connection
=
connection
self
.
ms
.
connection
=
connection
self
.
ms
.
data
=
'
%s FROM %s.
"
%s
"'
%
(
ds
[
ft_name
].
get_geometry_column
(),
cparam
.
get
(
"
schema
"
,
"
public
"
),
ft_name
)
self
.
ms
.
data
=
'
%s FROM %s.
"
%s
"'
%
(
ds
[
ft_name
].
get_geometry_column
(),
cparam
.
get
(
"
schema
"
,
"
public
"
),
ft_name
)
if
ft
.
get_fid_column
()
is
not
None
:
self
.
ms
.
data
+=
'
USING UNIQUE %s
'
%
ft
.
get_fid_column
()
print
(
ft
.
get_authority_name
(),
ft
.
get_authority_code
())
if
ft
.
get_authority_code
()
is
not
None
:
self
.
ms
.
data
+=
'
USING SRID=%s
'
%
ft
.
get_authority_code
()
# self.set_metadata("ows_extent", "%s %s %s %s" %
# self.set_metadata("ows_extent", "%s %s %s %s" %
# (ft.get_extent().minX(), ft.get_extent().minY(),
# (ft.get_extent().minX(), ft.get_extent().minY(),
# ft.get_extent().maxX(), ft.get_extent().maxY()))
# ft.get_extent().maxX(), ft.get_extent().maxY()))
...
@@ -634,7 +642,10 @@ class Workspace(Mapfile):
...
@@ -634,7 +642,10 @@ class Workspace(Mapfile):
copy
=
info
copy
=
info
for
m
in
path
[:
-
1
]:
for
m
in
path
[:
-
1
]:
copy
=
copy
.
get
(
m
)
copy
=
copy
.
get
(
m
)
del
copy
[
path
[
-
1
]]
try
:
del
copy
[
path
[
-
1
]]
except
:
pas
return
info
return
info
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment