Re: [OSM-dev] Zeroing or Extending a Hillshade-Tiff

2013-03-13 Thread Jochen Topf
On Tue, Mar 12, 2013 at 07:00:25PM +0100, Peter Körner wrote:
 Am 11.03.2013 21:10, schrieb Sven Geggus:
 Peter Körner osm-li...@mazdermind.de wrote:
 
 what way would you choose and wich tools could be used to go that way?
 
 Use the Water-Polygons from openstreetmapdata.com instead of land
 polygons.
 
 That's not that easy for the polar regions, because transforming the
 splittet polygons to the destination projection results in gaps
 because of straigt lines not beeing curved.
 
 For the land there are complete polygons which are used on the
 Antarctica map but there are no complete water polygons, because
 they would be too complex (a huge polygon with 400.000+ holes).
 
 So in order to get this right one would need to modify jochend
 osmcoastline tool to support EPSG:3031 natively, to all corrdinates
 are transformed before splitting and calculating the water polygons.

Another option would be to split up the long straight lines resulting from
the splitting into shorter pieces. If the pieces are short enough, it should
be okay. Maybe there is some tool around that can do that easily? I don't
want to put more and more of these things into OSMCoastline, because they
are not really related to coastlines, but general issues with large objects.

My first plan was to have a separate tool for the splitting, but because
I needed the split land polygons to create the water polygons I decided
to add this functionality into OSMCoastline to make it not too complicated
to use for the most common cases.

Jochen
-- 
Jochen Topf  joc...@remote.org  http://www.remote.org/jochen/  +49-721-388298

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Zeroing or Extending a Hillshade-Tiff

2013-03-13 Thread AJ Ashton
On Wed, Mar 13, 2013 at 12:13 PM, Jochen Topf joc...@remote.org wrote:

 On Tue, Mar 12, 2013 at 07:00:25PM +0100, Peter Körner wrote:
  That's not that easy for the polar regions, because transforming the
  splittet polygons to the destination projection results in gaps
  because of straigt lines not beeing curved.
 
  For the land there are complete polygons which are used on the
  Antarctica map but there are no complete water polygons, because
  they would be too complex (a huge polygon with 400.000+ holes).
 
  So in order to get this right one would need to modify jochend
  osmcoastline tool to support EPSG:3031 natively, to all corrdinates
  are transformed before splitting and calculating the water polygons.

 Another option would be to split up the long straight lines resulting from
 the splitting into shorter pieces. If the pieces are short enough, it
 should
 be okay. Maybe there is some tool around that can do that easily? I don't
 want to put more and more of these things into OSMCoastline, because they
 are not really related to coastlines, but general issues with large
 objects.


I have done this in the past with the split land and water shapefiles to
work with polar projections. ogr2ogr's -segmentize option with a value of
0.1 worked well for me on the WGS84 files.

-- 
AJ Ashton
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Zeroing or Extending a Hillshade-Tiff

2013-03-13 Thread Christoph Hormann
On Wednesday 13 March 2013, Jochen Topf wrote:

 Another option would be to split up the long straight lines resulting
 from the splitting into shorter pieces. If the pieces are short
 enough, it should be okay. Maybe there is some tool around that can
 do that easily? I don't want to put more and more of these things
 into OSMCoastline, because they are not really related to coastlines,
 but general issues with large objects.

Not quite actually - in case of splitting the problem does not stem from 
the long segments but from the fact that you split one polygon but do 
not split the edge of the adjacent one at the same time.  If you'd do 
that the edges could have any length, they would still fit after the 
reprojection (although you could get intersections between the actual 
coastline and the splitting lines).

-- 
Christoph Hormann
http://www.imagico.de/

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Zeroing or Extending a Hillshade-Tiff

2013-03-12 Thread Peter Körner

Am 11.03.2013 21:10, schrieb Sven Geggus:

Peter Körner osm-li...@mazdermind.de wrote:


what way would you choose and wich tools could be used to go that way?


Use the Water-Polygons from openstreetmapdata.com instead of land
polygons.


That's not that easy for the polar regions, because transforming the 
splittet polygons to the destination projection results in gaps because 
of straigt lines not beeing curved.


For the land there are complete polygons which are used on the 
Antarctica map but there are no complete water polygons, because they 
would be too complex (a huge polygon with 400.000+ holes).


So in order to get this right one would need to modify jochend 
osmcoastline tool to support EPSG:3031 natively, to all corrdinates are 
transformed before splitting and calculating the water polygons.


Peter


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Zeroing or Extending a Hillshade-Tiff

2013-03-11 Thread Sven Geggus
Peter Körner osm-li...@mazdermind.de wrote:

 what way would you choose and wich tools could be used to go that way?

Use the Water-Polygons from openstreetmapdata.com instead of land
polygons.

This way you can use a layer order like this:
* gray background
* hillshade
* water polygons without opacity

Regards

Sven

-- 
In my opinion MS is a lot better at making money than it is at making good
operating systems (Linus Torvalds, August 1997)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Zeroing or Extending a Hillshade-Tiff

2013-03-07 Thread Peter Körner

Hi

I have a Hillshading-Tiffs (a GeoTIFF with a single Greyscale-Band) in 
the correct projection and correctly aligned.


My problem is, that it's slightly smaller then the area I'd like to 
render using mapnik:


http://imageshack.us/photo/my-images/202/bildschirmfotovom201303.png/

There are options i'm aware of:
 a) set the water level (its values 180-182 in the greyscale-band) to
transparent, so there's no visible border at the end of the image
 b) extend the image with value 181 at the borders to fit the size of
the image i'm going to render

My question is:
what way would you choose and wich tools could be used to go that way?

Regards, Peter

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Zeroing or Extending a Hillshade-Tiff

2013-03-07 Thread Christoph Hormann
On Thursday 07 March 2013, Peter Körner wrote:
 b) extend the image with value 181 at the borders to fit the size of
 the image i'm going to render

 My question is:
 what way would you choose and wich tools could be used to go that
 way?

for b: 

gdalwarp -dstnodata 181

Note it is usually best to only hillshade the land and not the water so 
if you draw the water above the hillshade you won't have this edge 
problem (it is of course even better to modify the DEM before shading 
to match the coastline but that's quite a bit more complex).

I am currently preparing rendering polar maps myself so if you need 
hillshade images for the lower zoom levels i could provide them - for 
zoom=2 with 6000km map area (i think that's what you are using as 
well):

http://www.imagico.de/files/gshade_2_0_0.tif.bz2

Greetings,

-- 
Christoph Hormann
http://www.imagico.de/

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev