Hi
I am using the Raster symbolizer to include a colour relief file as
background.
I can generate the georef'd background files from either SRTM3V4 tifs (5
degree squares) or ASTER tifs (1 degree squares) using exactly the same
python script.
Viewing the resulting files in QGIS or other tools - the coordinates of
boundaries and features are correct.
Mapnik produces maps when I use either the ASTER or the SRTM derived tif as
background. My problem is that the SRTM derived background is displaced by
about 0.06 degrees to the North. Interestingly, East/West positioning
appears to be correct.
I am using the raster type rather than GDAL and entering the lox, loy etc by
hand. I am using a little routine, that Dane wrote, to do the lat/lon to
speherical Mercator coordinate conversion (so it clearly can't be that!)
Other info:
I'm using mapnik 0.6.1 on a Windows XP machine.
I have tried using the gdal type for the rastersymbolizer but mapnik just
renders as if the file was blank. (I believe this to be a separate issue
but...)
Contours produced from the same SRTM source data, and rendered to the same
map, are in the correct place (ie the same as other maps using a similar
process eg cycle
map, piste map.)
Any suggestions welcome.
Philip
The layer from my style sheet:
<Layer name="hillshade3" status="on" >
<StyleName>shading</StyleName>
<Datasource>
<Parameter name="type">raster</Parameter>
<Parameter
name="file">../../Relief/geoTIFF.srtm_39_03.tif</Parameter>
<Parameter name="lox">1113195</Parameter>
<Parameter name="loy">5621521</Parameter>
<Parameter name="hix">1669792</Parameter>
<Parameter name="hiy">6446276</Parameter>
</Datasource>
</Layer>
And, for info, srtm39_03 is the tile bounded by Long 10-15 and Lat 45-50.
Here's what gdalinfo says about my processed colour relief file:
C:\Documents and Settings\Admin>gdalinfo "C:\Documents and Settings\Admin\My
Documents\Mapping\Relief\geoTIFF.srtm_39_03.tif"
Driver: GTiff/GeoTIFF
Files: C:\Documents and Settings\Admin\My
Documents\Mapping\Relief\geoTIFF.srtm_39_03.tif
Size is 6000, 6000
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (10.000000000000000,50.000000000000000)
Pixel Size = (0.000833333333000,-0.000833333333000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 10.0000000, 50.0000000) ( 10d 0'0.00"E, 50d 0'0.00"N)
Lower Left ( 10.0000000, 45.0000000) ( 10d 0'0.00"E, 45d 0'0.00"N)
Upper Right ( 15.0000000, 50.0000000) ( 15d 0'0.00"E, 50d 0'0.00"N)
Lower Right ( 15.0000000, 45.0000000) ( 15d 0'0.00"E, 45d 0'0.00"N)
Center ( 12.5000000, 47.5000000) ( 12d30'0.00"E, 47d30'0.00"N)
Band 1 Block=6000x1 Type=Byte, ColorInterp=Red
Band 2 Block=6000x1 Type=Byte, ColorInterp=Green
Band 3 Block=6000x1 Type=Byte, ColorInterp=Blue
And finally this is what my tweaked version of Dane's coordinate converter
routine does:
Convert lat lon to sperical coords (and back as a check)
longitude: 10
latitude: 45
merc_coords: Coord(1113194.90793,5621521.48619)
longlat_coords: Coord(10.0,45.0)
Convert lat lon to sperical coords (and back as a check)
longitude: 15
latitude: 50
merc_coords: Coord(1669792.3619,6446275.84102)
longlat_coords: Coord(15.0,50.0)
--
Philip Howarth
Cambridge UK
email: [email protected]
web: www.philip.howarth.name
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users