build_renewable_profiles: Compute potentials in EPSG:3035 to ensure a metric of meters

This commit is contained in:
Jonas Hoersch 2018-12-19 10:27:46 +01:00
parent 135e4ace47
commit 350af4a273

View File

@ -50,7 +50,7 @@ def downsample_to_coarse_grid(bounds, dx, dy, mask, data):
def calculate_potential(gid): def calculate_potential(gid):
feature = gk.vector.extractFeature(snakemake.input.regions, where=gid) feature = gk.vector.extractFeature(snakemake.input.regions, where=gid)
ec = gl.ExclusionCalculator(feature.geom, srs=4326, pixelRes=1e-3) # about 100m in EU, it also works in LAEA 3035 ec = gl.ExclusionCalculator(feature.geom)
corine = config.get("corine", {}) corine = config.get("corine", {})
if isinstance(corine, list): if isinstance(corine, list):
@ -99,7 +99,7 @@ if __name__ == '__main__':
with Pool(initializer=init_globals, initargs=(bounds, dx, dy), with Pool(initializer=init_globals, initargs=(bounds, dx, dy),
maxtasksperchild=20, processes=snakemake.config['atlite'].get('nprocesses', 2)) as pool: maxtasksperchild=20, processes=snakemake.config['atlite'].get('nprocesses', 2)) as pool:
regions = gk.vector.extractFeatures(snakemake.input.regions, onlyAttr=True).iloc[:10] regions = gk.vector.extractFeatures(snakemake.input.regions, onlyAttr=True)
buses = pd.Index(regions['name'], name="bus") buses = pd.Index(regions['name'], name="bus")
widgets = [ widgets = [
pgb.widgets.Percentage(), pgb.widgets.Percentage(),