Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quadtreegrid
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Global Dynamic Exposure
OpenBuildingMap
quadtreegrid
Commits
53f93fc3
Commit
53f93fc3
authored
Sep 21, 2021
by
Nicolas Garcia Ospina
Browse files
Options
Downloads
Patches
Plain Diff
Addressed threads
parent
f13fd05e
No related branches found
No related tags found
No related merge requests found
Pipeline
#27913
passed
Sep 21, 2021
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
quadtreegrid/quadtreegrid.py
+1
-1
1 addition, 1 deletion
quadtreegrid/quadtreegrid.py
quadtreegrid/quadtreegrid_polyfill.py
+1
-2
1 addition, 2 deletions
quadtreegrid/quadtreegrid_polyfill.py
with
2 additions
and
3 deletions
quadtreegrid/quadtreegrid.py
+
1
−
1
View file @
53f93fc3
This diff is collapsed.
Click to expand it.
quadtreegrid/quadtreegrid_polyfill.py
+
1
−
2
View file @
53f93fc3
...
@@ -124,20 +124,19 @@ def get_tiles_from_polygon(in_geometry):
...
@@ -124,20 +124,19 @@ def get_tiles_from_polygon(in_geometry):
Returns:
Returns:
tiles_ids (list): List of quadkeys as strings.
tiles_ids (list): List of quadkeys as strings.
"""
"""
in_geometry
=
in_geometry
.
buffer
(
0.01
)
in_geometry
=
in_geometry
.
buffer
(
0.01
)
tiles
=
[]
tiles
=
[]
if
in_geometry
.
geom_type
==
"
Polygon
"
:
if
in_geometry
.
geom_type
==
"
Polygon
"
:
sw_lon
,
sw_lat
,
ne_lon
,
ne_lat
=
in_geometry
.
bounds
sw_lon
,
sw_lat
,
ne_lon
,
ne_lat
=
in_geometry
.
bounds
tiles_generator
=
mercantile
.
tiles
(
sw_lon
,
sw_lat
,
ne_lon
,
ne_lat
,
args
.
zoom
)
tiles_generator
=
mercantile
.
tiles
(
sw_lon
,
sw_lat
,
ne_lon
,
ne_lat
,
args
.
zoom
)
tiles
.
extend
([
mercantile
.
quadkey
(
tile
)
for
tile
in
tiles_generator
])
tiles
.
extend
([
mercantile
.
quadkey
(
tile
)
for
tile
in
tiles_generator
])
elif
in_geometry
.
geom_type
==
"
MultiPolygon
"
:
elif
in_geometry
.
geom_type
==
"
MultiPolygon
"
:
geometries
=
list
(
in_geometry
)
geometries
=
list
(
in_geometry
)
for
geometry
in
geometries
:
for
geometry
in
geometries
:
sw_lon
,
sw_lat
,
ne_lon
,
ne_lat
=
geometry
.
bounds
sw_lon
,
sw_lat
,
ne_lon
,
ne_lat
=
geometry
.
bounds
tiles_generator
=
mercantile
.
tiles
(
sw_lon
,
sw_lat
,
ne_lon
,
ne_lat
,
args
.
zoom
)
tiles_generator
=
mercantile
.
tiles
(
sw_lon
,
sw_lat
,
ne_lon
,
ne_lat
,
args
.
zoom
)
tiles
.
extend
([
mercantile
.
quadkey
(
tile
)
for
tile
in
tiles_generator
])
tiles
.
extend
([
mercantile
.
quadkey
(
tile
)
for
tile
in
tiles_generator
])
else
:
else
:
raise
IOError
(
"
Input is not a valid geometry.
"
)
raise
IOError
(
"
Input is not a valid geometry.
"
)
...
...
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