Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added dmr1 for Slovenia and fixed srtm #196

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added bounding box option for dmr1
DavixDevelop committed Jan 9, 2021
commit 8e41ef9d6a30a7197f86c57ef469c3df7aa11036
5 changes: 5 additions & 0 deletions config.slovenia.yaml
Original file line number Diff line number Diff line change
@@ -31,6 +31,11 @@ sources:
- type: dmr1
uri: http://gis.arso.gov.si/lidar/dmr1
fishnet_url: http://gis.arso.gov.si/related/lidar_porocila/lidar_fishnet_D96TM.zip
bbox:
top: 46.88333333
left: 13.39027778
bottom: 45.40750000
right: 16.62694444
logging:
config: logging.example.config
cluster:
5 changes: 5 additions & 0 deletions config.slovenia_test.yaml
Original file line number Diff line number Diff line change
@@ -31,6 +31,11 @@ sources:
- type: dmr1
uri: http://gis.arso.gov.si/lidar/dmr1
fishnet_url: http://gis.arso.gov.si/related/lidar_porocila/lidar_fishnet_D96TM.zip
bbox:
top: 46.239346
left: 15.237007
bottom: 46.205735
right: 15.288334
logging:
config: logging.example.config
cluster:
9 changes: 4 additions & 5 deletions joerd/source/dmr1.py
Original file line number Diff line number Diff line change
@@ -30,10 +30,6 @@
import mimetypes
from itertools import groupby

#this needs to be changed to the region you want to download and render
#Can be removed alongside line:141 and line:144 if memory usage due to the index is not important
REGION_BBOX = BoundingBox(15.237007,46.205735,15.288334,46.239346)

class DMR1Tile(object):
def __init__(self, parent, link, name, block, bbox):
self.uri = parent.uri
@@ -43,6 +39,7 @@ def __init__(self, parent, link, name, block, bbox):
self.block = block
self.link = link
self.bbox = bbox
self.region_bbox = parent.region_bbox

def __key(self):
return self.name
@@ -139,7 +136,7 @@ def _parse_dmr1_tile(link, parent):

#This is so the memory doesn't overflow, due to the big size of the index
#and is to be removed on a production server
if bbox.intersects(REGION_BBOX):
if bbox.intersects(parent.region_bbox):
return DMR1Tile(parent, link, name, block, bbox)

return None
@@ -149,6 +146,8 @@ def __init__(self, options={}):
self.base_dir = options.get('base_dir', 'dmr1')
self.uri = options['uri']
self.fishnet_url = options['fishnet_url']
box = options['bbox']
self.region_bbox = BoundingBox(box['left'], box['bottom'], box['right'],box['top'])
self.download_options = options
self.tile_index = None