Hi all
Geoserver does not recognise the 900913 WKT written by GDAL in GeoTIFF
headers. This is leading to huge shifts in raster rendering even when
EPSG:900913 is declared. The same rasters show no shift in other viewers
such as QGIS so there's something going on with Geoserver here.
I have projected multiple GeoTIFFs into 900913 using gdalwarp. When
publishing the store in geoserver the Native SRS is shown as UNKNOWN so
I declare EPSG:900913 and select Force declared. Geoserver never
persists the 'Force declared', always reverting to 'Reproject native to
declared'. So my diagnosis is that geoserver is attempting to project
the raster when it is not necessary or correct to do so.
Below are the scenarios I've experimented with (gdal 1.7, geoserver
2.0):
1) gdalwarp with t_srs "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0
+lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +wktext +over
+no_defs" writes this in the geotiff header:
PROJCS["unnamed",
GEOGCS["unnamed ellipse",
DATUM["unknown",
SPHEROID["unnamed",6378137,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Result: store publishes OK, with Unknown native projection and is
offset.
2) gdalwarp with t_srs "EPSG:900913" writes this in the geotiff header:
PROJCS["Google Maps Global Mercator",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Result: store publishes OK, with Unknown native projection and is
offset.
3) Geoserver maintains yet another WKT definition of WKT in
epsg.properties. I forced gdalwarp to use this by adding it to the
cubewerx_extra.wkt that gdal references, as follows, copying the proj4
EXTENSION from the 900913 line:
900914,PROJCS["WGS84 / Google Mercator", GEOGCS["WGS 84", DATUM["World
Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563,
AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree",
0.017453292519943295], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator
(1SP)", AUTHORITY["EPSG","9804"]], PARAMETER["semi_major", 6378137.0],
PARAMETER["semi_minor", 6378137.0], PARAMETER["latitude_of_origin",
0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor",
1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0],
UNIT["m", 1.0],
AUTHORITY["EPSG","900913"],EXTENSION["PROJ4","+proj=merc +a=6378137
+b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m
+nadgri...@null +wktext +no_defs"]]
Then I ran gdalwarp with t_srs "EPSG:900914" and it wrote this in the
geotiff header (complete header):
Driver: GTiff/GeoTIFF
Files: two.tif
Size is 10669, 11712
Coordinate System is:
PROJCS["WGS84_Google_Mercator",
GEOGCS["GCS_WGS_1984",
DATUM["D_World Geodetic System 1984",
SPHEROID["WGS_1984",6378137.0,298.257223563]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Mercator (1SP)"],
PARAMETER["semi_major",6378137.0],
PARAMETER["semi_minor",6378137.0],
PARAMETER["latitude_of_origin",0.0],
PARAMETER["central_meridian",0.0],
PARAMETER["false_easting",0.0],
PARAMETER["false_northing",0.0],
UNIT["m",1.0],
PARAMETER["standard_parallel_1",0.0]]
Origin = (3061095.039690456818789,-2998912.070841180160642)
Pixel Size = (0.557678323349409,-0.557678323349409)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=DEFLATE
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 3061095.040,-2998912.071)
Lower Left ( 3061095.040,-3005443.599)
Upper Right ( 3067044.910,-2998912.071)
Lower Right ( 3067044.910,-3005443.599)
Center ( 3064069.975,-3002177.835)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
NoData Value=0
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
NoData Value=0
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
NoData Value=0
Band 4 Block=256x256 Type=Byte, ColorInterp=Alpha
NoData Value=0
Result: I was hoping Geoserver would finally recognise this Coordinate
System as 900913 since it matches its own definition but unfortunately
it doesn't get to that point because I get this error when trying to
save the store:
"Could not list layers for this store, an error occurred retrieving
them: Unable to acquire a reader for this coverage with format: GeoTIFF"
Any tips? I'm getting to the end of my tether...
thanks in advance
--
Gavin
Gavin Fleming
http://afrispatial.co.za
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users