[OSM-dev] SRTM Contour generation and height labelling
Artem Pavlenko
artem at pavlenko.uklinux.net
Sun Feb 11 12:18:36 GMT 2007
Nick,
You can use segment merging code from osm2pgsql.c (or osm2sql.py). Also, JTS
and GEOS both should to the trick. I suggest you get a copy of JUMP (JTS
gui) and play with your shapefiles.
Something like this might work (untested:)
1. load shape file
2. run 'union' on segments with the same height
3. split MultiLineStrings into LineStrings
3. export to shapefile
Also, why don't you create one big shapefile for the whole country + index
file?
Cheers
Artem
On Sunday 11 February 2007 10:37, Nick Whitelegg wrote:
> Hello everyone,
>
> I have something of a problem with height labelling on SRTM contours using
> Mapnik. The problem is that because the contours are generated by working
> out intersection points in each grid square within the SRTM height file
> (grid square are 1/120 degree across) the contour polylines in the
> generated shapefile are too short to be labelled in Mapnik. That is, each
> contour polyline in the shapefile only spans one 1/120 degree grid square.
>
> As well as my own utility (described above), the GDAL utility,
> gdal_contour, also results in contours which are not labelled frequently
> enough.
>
> Looking at it, it seems that it will be very complex to write code from
> scratch to be able to define individual contour lines which cross multiple
> 1/120 degree grid squares (e.g. treat the 500ft contour surrounding a 3km
> radius hill as a single polyline in a shapefile). Can anyone provide any
> pointers, maybe to existing code to solve this problem?
>
> Thanks,
> Nick
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
More information about the dev
mailing list