shadow-mapper icon indicating copy to clipboard operation
shadow-mapper copied to clipboard

Empty heightmap with some sizes

Open buma opened this issue 11 years ago • 1 comments

If I do:

python heightmap.py --projection EPSG:3857 --elevation-dir data/ --output my.heightmapB1 --geojson export.geojson --save-image my1.png 46.55 15.65 8 1000

I get heightmap as expected, but if I raise size to 2024 I get empty heightmap. Any idea why?

python heightmap.py --projection EPSG:3857 --elevation-dir data/ --output my.heightmapB2 --geojson export.geojson --save-image my2.png 46.55 15.65 8 2024

Size seems to depend on projection, because If I use projection epsg:3006 everything is black with size 1024, which works in projection EPSG:3857.

And If I render anything with this heightmap everything is black.

buma avatar Aug 04 '14 22:08 buma

Hm, that sounds a bit weird. I would have to take a closer look at this.

A quick comment: EPSG:3857 might not be suitable for accurate results, since the distance unit for this projection is "pseudo meters", meaning it will not be exact meters. One unit on the y axis will be approximately one meter, but one unit on the x axis differs with latitude (this is pretty apparent if you look at the scale bar in Google Maps when you move north and south).

I would recommend using a local projection, that's why I used EPSG:3006, which works well in Sweden and gives uniform distances.

One idea I had initially was to automatically select the approriate UTM projection for the given location, but I haven't gotten around to it yet.

perliedman avatar Aug 09 '14 05:08 perliedman