[Geoserver-users] R: Problems with a geotiff raster (geoserver 1.5.0-RC1)

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 :slight_smile:
>
> 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

Hi,

I face the same problem with my geotiff, after a gdal_translate to include
the srs. My first goal was to build mosaic to build pyramid... but it brakes
with errors on the mosaic tool. After i tried to add it directly in
geoserver as a geotiff and i have the same messages as you.

Do you find something?

Fabio Da Soghe wrote:

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 :slight_smile:
>
> 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

-------------------------------------------------------------------------
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

--
View this message in context: http://www.nabble.com/R%3A-Problems-with-a-geotiff-raster-(geoserver-1.5.0-RC1)-tf3368051.html#a11075939
Sent from the GeoServer - User mailing list archive at Nabble.com.

Audaire David ha scritto:

Hi,

I face the same problem with my geotiff, after a gdal_transform to include
the srs. My first goal was to build mosaic to build pyramid... but it brakes
with errors on the mosaic tool. After i tried to add it directly in
geoserver as a geotiff and i have the same messages as you.

Do you find something?

In Fabio case as far as I remember the geotiff was missing the CRS.
Can you paste the gdal_info output for that file?

Cheers
Andrea

Hi,

Here is the gdalinfo info.

if you see something

Driver: GTiff/GeoTIFF
Size is 6524, 9490
Coordinate System is:
PROJCS["NTF (Paris) / Lambert zone I",
    GEOGCS["NTF (Paris)",
        DATUM["Nouvelle_Triangulation_Francaise_Paris",
            SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,
                AUTHORITY["EPSG","7011"]],
            AUTHORITY["EPSG","6807"]],
        PRIMEM["Paris",2.33722917],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4807"]],
    PROJECTION["Lambert_Conformal_Conic_1SP"],
    PARAMETER["latitude_of_origin",49.5],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",0.999877341],
    PARAMETER["false_easting",600000],
    PARAMETER["false_northing",1200000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","27571"]]
GeoTransform =
  599200.1764499999, 0.0843, 0
  133806.58285, 1, -0.0843
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
Corner Coordinates:
Upper Left ( 599200.176, 133806.583) ( 0d 0'33.26"W, 39d56'48.25"N)
Lower Left ( 599200.176, 133006.576) ( 0d 0'33.25"W, 39d56'22.65"N)
Upper Right ( 599750.150, 140330.583) ( 0d 0'10.40"W, 40d 0'17.07"N)
Lower Right ( 599750.150, 139530.576) ( 0d 0'10.40"W, 39d59'51.46"N)
Center ( 599475.163, 136668.579) ( 0d 0'21.83"W, 39d58'19.85"N)
Band 1 Block=6524x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 0,0,0,255
    1: 0,0,51,255......

thank's

aaime wrote:

Audaire David ha scritto:

Hi,

I face the same problem with my geotiff, after a gdal_transform to
include
the srs. My first goal was to build mosaic to build pyramid... but it
brakes
with errors on the mosaic tool. After i tried to add it directly in
geoserver as a geotiff and i have the same messages as you.

Do you find something?

In Fabio case as far as I remember the geotiff was missing the CRS.
Can you paste the gdal_info output for that file?

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/R%3A-Problems-with-a-geotiff-raster-(geoserver-1.5.0-RC1)-tf3368051.html#a11094866
Sent from the GeoServer - User mailing list archive at Nabble.com.

hi,

It seems that the problem doesn't come from the
TIFFTAG_XRESOLUTION
TIFFTAG_YRESOLUTION
TIFFTAG_RESOLUTIONUNIT

i add them with the -mo option in gdal_translate and geoserver give me back
the same error.

Fabio Da Soghe wrote:

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 :slight_smile:
>
> 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

-------------------------------------------------------------------------
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

--
View this message in context: http://www.nabble.com/R%3A-Problems-with-a-geotiff-raster-(geoserver-1.5.0-RC1)-tf3368051.html#a11137492
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao David,
could you please send me a sample geotiff to play with.

However I won't be able to test it before next week.

Ciao,
Simone.

-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it

-------------------------------------------------------

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Audaire
David
Sent: venerdì 15 giugno 2007 13.23
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] R: Problems with a geotiff raster (geoserver
1.5.0-RC1)

hi,

It seems that the problem doesn't come from the
TIFFTAG_XRESOLUTION
TIFFTAG_YRESOLUTION
TIFFTAG_RESOLUTIONUNIT

i add them with the -mo option in gdal_translate and geoserver give me back
the same error.

Fabio Da Soghe wrote:

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 :slight_smile:
>
> 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

-------------------------------------------------------------------------
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

--
View this message in context:
http://www.nabble.com/R%3A-Problems-with-a-geotiff-raster-(geoserver-1.5.0
-RC1%29-tf3368051.html#a11137492
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

ok thank's i'll send you one getotiff next week (i am already in week-end
8-))

Simone.Giannecchini wrote:

Ciao David,
could you please send me a sample geotiff to play with.

However I won't be able to test it before next week.

Ciao,
Simone.

-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it

-------------------------------------------------------

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Audaire
David
Sent: venerdì 15 giugno 2007 13.23
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] R: Problems with a geotiff raster
(geoserver
1.5.0-RC1)

hi,

It seems that the problem doesn't come from the
TIFFTAG_XRESOLUTION
TIFFTAG_YRESOLUTION
TIFFTAG_RESOLUTIONUNIT

i add them with the -mo option in gdal_translate and geoserver give me
back
the same error.

Fabio Da Soghe wrote:

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 :slight_smile:
>
> 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

-------------------------------------------------------------------------
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

--
View this message in context:
http://www.nabble.com/R%3A-Problems-with-a-geotiff-raster-(geoserver-1.5.0
-RC1%29-tf3368051.html#a11137492
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/R%3A-Problems-with-a-geotiff-raster-(geoserver-1.5.0-RC1)-tf3368051.html#a11138531
Sent from the GeoServer - User mailing list archive at Nabble.com.

Good for you :-(.

Talk to you next week then.

Have a nice weekend :-).

Ciao,
Simone.

-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it

-------------------------------------------------------

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Audaire
David
Sent: venerdì 15 giugno 2007 14.32
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] R: Problems with a geotiff raster (geoserver
1.5.0-RC1)

ok thank's i'll send you one getotiff next week (i am already in week-end
8-))

Simone.Giannecchini wrote:

Ciao David,
could you please send me a sample geotiff to play with.

However I won't be able to test it before next week.

Ciao,
Simone.

-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it

-------------------------------------------------------

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Audaire
David
Sent: venerdì 15 giugno 2007 13.23
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] R: Problems with a geotiff raster
(geoserver
1.5.0-RC1)

hi,

It seems that the problem doesn't come from the
TIFFTAG_XRESOLUTION
TIFFTAG_YRESOLUTION
TIFFTAG_RESOLUTIONUNIT

i add them with the -mo option in gdal_translate and geoserver give me
back
the same error.

Fabio Da Soghe wrote:

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 :slight_smile:
>
> 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

-------------------------------------------------------------------------
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

--
View this message in context:

http://www.nabble.com/R%3A-Problems-with-a-geotiff-raster-(geoserver-1.5.0

-RC1%29-tf3368051.html#a11137492
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context:
http://www.nabble.com/R%3A-Problems-with-a-geotiff-raster-(geoserver-1.5.0
-RC1%29-tf3368051.html#a11138531
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users