[Geoserver-users] LOCAL_CS vs. AUTHORITY?

I've loaded a LOCAL_CS into a GeoServer instance as follows:

LOCAL_CS["ImageCS",
   LOCAL_DATUM["MyDummyDatum", 0],
   UNIT["m", 1.0],
   AXIS["X", EAST],
   AXIS["Y", SOUTH]]

and it parses perfectly well. There's only one problem: it appears in the available SRS list as:

LOCAL_CS["ImageCS",
   LOCAL_DATUM["MyDummyDatum", 0],
   UNIT["m", 1.0],
   AXIS["X", EAST],
   AXIS["Y", SOUTH],
   AUTHORITY["EPSG","1"]]

which, strictly speaking, isn't true (if I understand the WKT projection format correctly). I have no authority from EPSG to discuss this (strictly local, to be used for image annotation) CRS as "EPSG:1".

I couldn't find out where this is happening. I looked in GeoserverCustomWKTFactory, but that doesn't seem to be any problem, and I couldn't find the culprit in a quick search through GeoTools. Any suggestions? Although the services to be produced from this data should be pretty obviously -not- in any EPSG-coded CRS, I'd like to be as accurate as possible.

---
A. Soroka / Digital Scholarship Services R & D
the University of Virginia Library

I should mention that I do see my local CRS show up in the WMS GetCapabilities as "<SRS>EPSG:1</SRS>", so I don't think it's a question of the handy SRS list.

One other point I want to mention even though it is mentioned from time to time on this list:

One -must- add a fake WGS84 bounding box to the config for any featureType.

If you don't have a bbox, GeoServer will beef. If you try to have the form fill in automatically from the kind of CRS I'm using, you get: 'No transformation available from system "EngineeringCRS[ImageCS]" to "GeographicCRS[WGS 84]".' which is, of course, exactly what you should get.

Lastly, I'll mention that I'm running this data out of PostGIS, which seems to be handling everything fine.

This question (of "floating" CRSes) was raised in January:

http://www.nabble.com/GeoServer-with-non-spatial-SRID--td14790160.html#a14797986

but I didn't hear anything about it afterwards. I'm glad to report that it seems to work perfectly well.

---
A. Soroka / Digital Scholarship Services R & D
the University of Virginia Library

On Apr 5, 2009, at 11:09 AM, ajs6f wrote:

I've loaded a LOCAL_CS into a GeoServer instance as follows:

LOCAL_CS["ImageCS",
  LOCAL_DATUM["MyDummyDatum", 0],
  UNIT["m", 1.0],
  AXIS["X", EAST],
  AXIS["Y", SOUTH]]

and it parses perfectly well. There's only one problem: it appears in
the available SRS list as:

LOCAL_CS["ImageCS",
  LOCAL_DATUM["MyDummyDatum", 0],
  UNIT["m", 1.0],
  AXIS["X", EAST],
  AXIS["Y", SOUTH],
  AUTHORITY["EPSG","1"]]

which, strictly speaking, isn't true (if I understand the WKT
projection format correctly). I have no authority from EPSG to discuss
this (strictly local, to be used for image annotation) CRS as "EPSG:1".

I couldn't find out where this is happening. I looked in
GeoserverCustomWKTFactory, but that doesn't seem to be any problem,
and I couldn't find the culprit in a quick search through GeoTools.
Any suggestions? Although the services to be produced from this data
should be pretty obviously -not- in any EPSG-coded CRS, I'd like to be
as accurate as possible.

---
A. Soroka / Digital Scholarship Services R & D
the University of Virginia Library

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

ajs6f ha scritto:

I've loaded a LOCAL_CS into a GeoServer instance as follows:

LOCAL_CS["ImageCS",
   LOCAL_DATUM["MyDummyDatum", 0],
   UNIT["m", 1.0],
   AXIS["X", EAST],
   AXIS["Y", SOUTH]]

Hmmm... where did you add it, and how? epsg.properties?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

ajs6f ha scritto:

I should mention that I do see my local CRS show up in the WMS GetCapabilities as "<SRS>EPSG:1</SRS>", so I don't think it's a question of the handy SRS list.

One other point I want to mention even though it is mentioned from time to time on this list:

One -must- add a fake WGS84 bounding box to the config for any featureType.

If you don't have a bbox, GeoServer will beef. If you try to have the form fill in automatically from the kind of CRS I'm using, you get: 'No transformation available from system "EngineeringCRS[ImageCS]" to "GeographicCRS[WGS 84]".' which is, of course, exactly what you should get.

There is no workaround for this. WMS requires us to publish a lat/lon
bounding box for each layer, so like it or not, one has to be provided.
There is no space for non georeferenced data in the WMS proper, you
can just publish non georeferenced data by liying about their location.

It would be nice to have GeoServer deal more gracefully with non
georeferenced data, but some hookes here and there need to be added.
Feel free to open a "new feature" request on jira.codehaus.org

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

I hope you didn't take that as a complaint-- I was just reminding people who might be interested in doing this that the step is required. Otherwise, one might not realize why a featureType isn't getting produced.

I'm frankly not inclined to suggest this as an area of research or work. It doesn't seem very close to GeoServer's core missions. I think it's only of interest to a few people like me (also perhaps architects and engineers).

---
A. Soroka / Digital Scholarship Services R & D
the University of Virginia Library

On Apr 8, 2009, at 4:21 AM, Andrea Aime wrote:

ajs6f ha scritto:

I should mention that I do see my local CRS show up in the WMS GetCapabilities as "<SRS>EPSG:1</SRS>", so I don't think it's a question of the handy SRS list.
One other point I want to mention even though it is mentioned from time to time on this list:
One -must- add a fake WGS84 bounding box to the config for any featureType.
If you don't have a bbox, GeoServer will beef. If you try to have the form fill in automatically from the kind of CRS I'm using, you get: 'No transformation available from system "EngineeringCRS[ImageCS]" to "GeographicCRS[WGS 84]".' which is, of course, exactly what you should get.

There is no workaround for this. WMS requires us to publish a lat/lon
bounding box for each layer, so like it or not, one has to be provided.
There is no space for non georeferenced data in the WMS proper, you
can just publish non georeferenced data by liying about their location.

It would be nice to have GeoServer deal more gracefully with non
georeferenced data, but some hookes here and there need to be added.
Feel free to open a "new feature" request on jira.codehaus.org

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Exactly- epsg.properties. The line I added reads:

1=LOCAL_CS["ImageCS", LOCAL_DATUM["MyDummyDatum", 0], UNIT["Pixel",1],AXIS["X", EAST] ,AXIS["Y", SOUTH] ]

(all on one line)

I want to emphasize that this all works perfectly well-- it's just the advertisement of authority that is wrong. Actually, now that I look more closely at epsg.properties, I notice that the same markup is being added to -all- of them, e.g.

42305=PROJCS["France_II",GEOGCS["GCS_NTF_Paris",DATUM["Nouvelle_Triangulation_Francaise",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Paris",2.337229166666667],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",2200000],PARAMETER["Central_Meridian",0],PARAMETER["Standard_Parallel_1",45.898918964419],PARAMETER["Standard_Parallel_2",47.696014502038],PARAMETER["Latitude_Of_Origin",46.8],UNIT["Meter",1]]

becomes

PROJCS["France_II",
   GEOGCS["GCS_NTF_Paris",
     DATUM["Nouvelle_Triangulation_Francaise",
       SPHEROID["Clarke_1880_IGN", 6378249.2, 293.46602]],
     PRIMEM["Paris", 2.337229166666667],
     UNIT["degree", 0.017453292519943295],
     AXIS["Longitude", EAST],
     AXIS["Latitude", NORTH]],
   PROJECTION["Lambert_Conformal_Conic_2SP"],
   PARAMETER["central_meridian", 0.0],
   PARAMETER["latitude_of_origin", 46.8],
   PARAMETER["standard_parallel_1", 45.89891896441899],
   PARAMETER["false_easting", 600000.0],
   PARAMETER["false_northing", 2200000.0],
   PARAMETER["standard_parallel_2", 47.696014502038004],
   UNIT["m", 1.0],
   AXIS["x", EAST],
   AXIS["y", NORTH],
   AUTHORITY["EPSG","42305"]]

and here the axes seem to have received names, as well.

---
A. Soroka / Digital Scholarship Services R & D
the University of Virginia Library

On Apr 8, 2009, at 4:18 AM, Andrea Aime wrote:

ajs6f ha scritto:

I've loaded a LOCAL_CS into a GeoServer instance as follows:
LOCAL_CS["ImageCS",
  LOCAL_DATUM["MyDummyDatum", 0],
  UNIT["m", 1.0],
  AXIS["X", EAST],
  AXIS["Y", SOUTH]]

Hmmm... where did you add it, and how? epsg.properties?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

ajs6f ha scritto:

I hope you didn't take that as a complaint-- I was just reminding people who might be interested in doing this that the step is required. Otherwise, one might not realize why a featureType isn't getting produced.

I'm frankly not inclined to suggest this as an area of research or work. It doesn't seem very close to GeoServer's core missions. I think it's only of interest to a few people like me (also perhaps architects and engineers).

Eh, there is a number of files out there for which people don't have
a good native SRS, and a lot of people that "just want to display
the stinkin' layer" that do not know what a SRS is to start with.

So having GeoServer defaulting to some kind of engineering srs
if the user cannot provide a better one would not be a bad idea.

But it would require quite some work, or else we could try to
default to an SRS that does not complain when one tries to
reproject it (there is one in GeoTools, it's called pure
cartesian something).

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.