Hello Justin.
You're right, after your message I found the stack trace: my Tomcat configuration put something in the standard out and something other in the localhost log :-/
Most probably the error is someway related to my geotiff: I mean, it hasn't all the correct metadata. Anyway I'm not able to understand what metadata is missing, or why it's missing (from the gdal_translate call).
The gdalinfo for the original tif+tfw tells me this:
Driver: GTiff/GeoTIFF
Size is 4972, 10953
Coordinate System is `'
GeoTransform =
1402796.794050454, -5.270943e-06, 0.112851313689
5000064.8790963, 0.112851313599, 5.270973e-06
Metadata:
TIFFTAG_DATETIME=2006:12:19 10:21:07
TIFFTAG_XRESOLUTION=450
TIFFTAG_YRESOLUTION=450
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left ( 1402796.794, 5000064.879)
Lower Left ( 1404032.854, 5000064.937)
Upper Right ( 1402796.768, 5000625.976)
Lower Right ( 1404032.828, 5000626.034)
Center ( 1403414.811, 5000345.456)
Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
Color Table (RGB with 2 entries)
0: 0,0,0,255
1: 255,255,255,255
The same gdalinfo for the translated raster in geotiff (with the command I reported in my first mail, where I specify an output SRID=EPSG:3003) says this:
Driver: GTiff/GeoTIFF
Size is 4972, 10953
Coordinate System is:
PROJCS["Monte Mario / Italy zone 1",
GEOGCS["Monte Mario",
DATUM["Monte_Mario",
SPHEROID["International 1924",6378388,297.000000000005,
AUTHORITY["EPSG","7022"]],
AUTHORITY["EPSG","6265"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4265"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",1500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","3003"]]
GeoTransform =
1402796.794050454, -5.270943e-06, 0.112851313689
5000064.8790963, 0.112851313599, 5.270973e-06
Metadata:
AREA_OR_POINT=Area
Corner Coordinates:
Upper Left ( 1402796.794, 5000064.879) ( 7d45'48.95"E, 45d 8'47.50"N)
Lower Left ( 1404032.854, 5000064.937) ( 7d46'45.54"E, 45d 8'48.11"N)
Upper Right ( 1402796.768, 5000625.976) ( 7d45'48.56"E, 45d 9'5.68"N)
Lower Right ( 1404032.828, 5000626.034) ( 7d46'45.15"E, 45d 9'6.29"N)
Center ( 1403414.811, 5000345.456) ( 7d46'17.05"E, 45d 8'56.90"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
Color Table (RGB with 256 entries)
0: 0,0,0,255
1: 255,255,255,255
2: 0,0,0,255
3: 0,0,0,255
[...]
254: 0,0,0,255
255: 0,0,0,255
... Well, now that I rewatch them (I apologize, yesterday was quite tired when I came to this point :-/), I note the geotiff lacks some metadata, precisely these:
TIFFTAG_XRESOLUTION=450
TIFFTAG_YRESOLUTION=450
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Could it be cause of the problem?
Thank you,
Fabio
-----Messaggio originale-----
Da: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] Per
conto di Justin Deoliveira
Inviato: mercoledì 7 marzo 2007 19.14
A: Fabio Da Soghe
Cc: 'geoserver-users@lists.sourceforge.net'
Oggetto: Re: [Geoserver-users] Problems with a geotiff raster
(geoserver 1.5.0-RC1)Hi Fabio,
I can confirm the same exception. The detailed stack trace ( which
should have been available from your console? ) is:java.lang.NullPointerException at
org.geotools.gce.geotiff.GeoTiffException.getMessage(GeoTiffEx
ception.java:158)
at
org.geotools.data.DataSourceException.<init>(DataSourceExcepti
on.java:47)
at
org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:222)
at
org.geotools.gce.geotiff.GeoTiffFormat.getReader(GeoTiffFormat
.java:252)
...Which hides the original exception, for which I got a message of:
"Unknown Raster to Model configuration."
Which occurs when the geotiff reader is trying to compute the
raster to
world transformation. From what I can tell ( and i am by no means an
expert so apologies of what i am saying does not make sense or is
obvious ), but the raster metadata does not specify the tie points or
pixel scales needed to perform the transformation. Which is
actually the
problem that is causing the exception above. So perhaps the
metadata for
the resulting tif has gone wacky?I think the GeoTiffException class needs to be a bit more
careful about
looking up information to report in an exception message?I am sure someone more knowledgeable can provide more useful
information.-Justin
Fabio Da Soghe wrote:
> Hello.
>
> I'm trying to publish a geotiff raster with Geoserver 1.5.0-RC1.
> This raster is created from a tif+tfw+prj file, using the
utility gdal_translate (as Andrea Aime suggested me some time ago
>
> After several tries I managed to get a (apparently) correct
geotiff: the command gdalinfo tells me info that seems right
(except that the original raster has 2 entry in the rgb
table, while the geotiff version has 256 entry - the last 254
are all 0s).
>
> The CoverageStore creation is ok. But when I create the
coverage, I get this page:
>
> GeoServer - Exception
> The following exception was thrown:
> java.lang.NullPointerException
>
> I read the tomcat log, there's nothing more, neither in the
geoserver log (into the data/logs).
>
> The command which with I created the raster is this:
>
> gdal_translate -of GTiff -b 1 -co "PROFILE=GeoTIFF" -co
"INTERLEAVE=PIXEL" -co "COMPRESS=LZW" -co "TILED=YES" -a_srs
EPSG:3003 cascinanuova2.tif provagt_3003.tif
>
> Of course I can supply the original raster and the geotiff
version, if desired.
>
> Thanks for any hint.
>
> Cheers,
>
> Fabio
>
>
--------------------------------------------------------------
-----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge
&CID=DEVDEV
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> !DSPAM:1004,45eef92c237372051017194!
>--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org--------------------------------------------------------------
-----------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge
&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users