[Geoserver-users] R: R: R: R: Problems with EPSG lookup

Da: Andrea Aime [mailto:aaime@anonymised.com]

> Fabio Da Soghe ha scritto:
> I have plenty of rasters to publish, and the only way I see
by now is
> to convert all of them to 4326. Is there any hope to have Geoserver
> take my tif+tfw and listen to me about the CRS?

Hum, I think if you provide a .prj file with the same WKT as
reported by Geoserver for 3003 it should work fine. Oh, to be
sure, put the whole WKT in a single line, not nicely
formatted as in the Geoserver output.

Ok, now I got a new result.
I didn't put the .prj file in Geoserver: only a .tif and a .tfw.
I did as you suggested: I created a text file with same name as the raster, and on a single line I put the WKT of SRID:3003. Now it works! Geoserver guesses correctly the SRID and reads the right coverage's envelope!

So I was missing this prj file. Well, I have to say two things.

1) I didn't know to have to supply the .prj file: all softwares I use to manage rasters are able to use the tif and the tfw. Of course that was my fault, but maybe there are other users like me, not used to supply the prj file along with their rasters.

2) As a Geoserver user, it seems a bit misleading to have a web UI where I can apparently put my SRID but what is really important is to supply the datas completely and accurately configured. I mean: I absolutely agree one has to supply correct and complete data, but then why bothering with a web property page where to put again same information? In my case, for example, if the web page was only a information tool about my data's configuration, it would have helped me much more figuring out what was going on.

For the second point, maybe there is a little defect in the actual web property page ("Coverage Editor"): without a .prj file it should say EPSG:UNKNOWN and not EPSG:4326, arbitrarily. If this is the case, I can fill a Jira issue, if you need to.

Anyway, there is still a problem with my raster: it doesn't get georeferenced properly (I'll discuss this better in my following mail in answer to Alessio Fabiani).

Thank you for your support and great work!

Cheers,

Fabio

Fabio Da Soghe ha scritto:

Da: Andrea Aime [mailto:aaime@anonymised.com]

  > 1) I didn't know to have to supply the .prj file: all softwares I use

to manage rasters are able to use the tif and the tfw. Of course that
was my fault, but maybe there are other users like me, not used to
supply the prj file along with their rasters.

Well, this is a hole in the tiff+tfw approach we're trying
to fix, that is, tfw does not provide CRS information.
A new wiki page is needed to guide people using image + tfw files.
Do you have time to write one? :slight_smile:

2) As a Geoserver user, it seems a bit misleading to have a web UI
where I can apparently put my SRID but what is really important is to
supply the datas completely and accurately configured. I mean: I
absolutely agree one has to supply correct and complete data, but
then why bothering with a web property page where to put again same
information? In my case, for example, if the web page was only a
information tool about my data's configuration, it would have helped
me much more figuring out what was going on.

There are a few cases here that make us still want to have that page:
* data without CRS -> you have to provide us one (the gt2-image is
   buggy in this respect)
* data with a CRS that cannot be mapped to any known EPSG code.
   Here you have to choose one since the standard tells us that we have
   to advertise an EPSG code, possibly one with little trasformation cost
   compared to the native one.
* data with a CRS that can be mapped to EPSG codes, but only after a
   5-10 search in the EPSG database. This happens when the WKT does not
   provide an EPSG code, but just the projection parameters.
   I guess you would not want to wait for the search to be fully
   performed if you already know the code, hence the lookup SRS and the
   possibility for you to input by hand.

Ah, I guess I need to add a user page explaining the ins and outs of
this way of doing things. I've tried to make Geoserver work in most
situations, the result is not really as straightforward as I'd like.
Any suggestions on how to improve it?

For the second point, maybe there is a little defect in the actual
web property page ("Coverage Editor"): without a .prj file it should
say EPSG:UNKNOWN and not EPSG:4326, arbitrarily. If this is the case,
I can fill a Jira issue, if you need to.

Very much agreed. I kind of remember that in the old ages (a few years ago) it was decided somehow that files without a .prj should be in 4326 because it was supposed to be the most common CRS, but I fully agree it's a bad idea.
Please do open a Jira issue agains gt2-image.

Cheers
Andrea