Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GeoPEAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
esde
toar-data
GeoPEAS
Commits
0b4f435d
Commit
0b4f435d
authored
5 years ago
by
leufen1
Browse files
Options
Downloads
Patches
Plain Diff
major roads service uses now the new CommonView class
parent
45cf5a4f
Branches
lukas_issue017_refac_restrict-agg-functions
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
major-roads/views.py
+5
-3
5 additions, 3 deletions
major-roads/views.py
with
5 additions
and
3 deletions
major-roads/views.py
+
5
−
3
View file @
0b4f435d
...
...
@@ -4,13 +4,15 @@ from collections import OrderedDict
from
rest_framework.views
import
APIView
from
rest_framework.response
import
Response
from
utils.views_commons
import
get_query_param
s
from
utils.views_commons
import
CommonView
s
from
.overpass_api
import
OverpassRoadAPI
from
.serializers
import
NearestSerializer
,
NearestDirectionSerializer
,
NearestByDirectionSerializer
class
MajorRoadsView
(
APIView
):
class
MajorRoadsView
(
APIView
,
CommonViews
):
def
__init__
(
self
):
CommonViews
.
__init__
(
self
)
def
get
(
self
,
request
,
format
=
None
):
"""
process GET requests for major-roads app
...
...
@@ -34,7 +36,7 @@ class MajorRoadsView(APIView):
Default is motorway,trunk,primary,secondary.
For additional options see https://wiki.openstreetmap.org/wiki/Key:highway
"""
lat
,
lon
,
radius
,
direction
,
by_direction
,
highway_types
=
get_query_params
(
lat
,
lon
,
radius
,
direction
,
by_direction
,
highway_types
=
self
.
get_query_params
(
request
.
query_params
,
[
'
lat
'
,
'
lon
'
,
'
radius
'
,
'
direction
'
,
'
by_direction
'
,
'
highway_types
'
],
add_agg
=
False
...
...
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