Skip to content

Commit

Permalink
Fixed default raster scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
sevberg committed Sep 5, 2018
1 parent ee4b05b commit bd3fb17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions geokit/core/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ def __init__(s, locations, srs=4326, _skip_check=False):
if not _skip_check:
if isinstance(locations, ogr.Geometry) or isinstance(locations, Location):
s._locations = np.array([Location.load(locations, srs=srs), ])
elif isinstance(locations, LocationSet):
s._locations = locations[:]
elif isinstance(locations, pd.DataFrame):
s._locations = LocationSet( locations["geom"] )[:]
else:
try: # Try loading all locations one at a time
s._locations = np.array([Location.load(l, srs=srs) for l in locations])
Expand Down
2 changes: 1 addition & 1 deletion geokit/core/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def gdalType(s):

####################################################################
# Raster writer
def createRaster( bounds, output=None, pixelWidth=100, pixelHeight=100, dtype=None, srs='europe_m', compress=True, noData=None, overwrite=True, fill=None, data=None, meta=None, scale=0, offset=0, **kwargs):
def createRaster( bounds, output=None, pixelWidth=100, pixelHeight=100, dtype=None, srs='europe_m', compress=True, noData=None, overwrite=True, fill=None, data=None, meta=None, scale=1, offset=0, **kwargs):
"""Create a raster file
NOTE:
Expand Down

0 comments on commit bd3fb17

Please sign in to comment.