[Geoserver-users] epsg code error

There seems to be an error in epsg 32058. The false easting is defined
in feet, but seems to be interpreted by geoserver as meters, so my
data is shifted quite a ways. Where are the epsg codes stored? What
library is used to (re)project data? I know with GDAL that all
parameters must be in meters, even for projections that are in feet.

Thanks,
Rich

--
Richard Greenwood
richard.greenwood@anonymised.com
www.greenwoodmap.com

All epsg support is handled by the geotools library. I am cross posting this there. Might just be that you have found a bug in our epsg database.

-Justin

Richard Greenwood wrote:

There seems to be an error in epsg 32058. The false easting is defined
in feet, but seems to be interpreted by geoserver as meters, so my
data is shifted quite a ways. Where are the epsg codes stored? What
library is used to (re)project data? I know with GDAL that all
parameters must be in meters, even for projections that are in feet.

Thanks,
Rich

--
Justin Deoliveira
jdeolive@anonymised.com
The Open Planning Project
http://topp.openplans.org

Richard:

Which release are you using? We have a wiki page on a custom proj
definition in Geoserver, see if it helps:

http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver

You can view the details for srs definitions at:

http://localhost:8080/geoserver/srsHelp.do

Alex

On 1/21/07, Justin Deoliveira <jdeolive@anonymised.com> wrote:

All epsg support is handled by the geotools library. I am cross posting
this there. Might just be that you have found a bug in our epsg database.

-Justin

Richard Greenwood wrote:
> There seems to be an error in epsg 32058. The false easting is defined
> in feet, but seems to be interpreted by geoserver as meters, so my
> data is shifted quite a ways. Where are the epsg codes stored? What
> library is used to (re)project data? I know with GDAL that all
> parameters must be in meters, even for projections that are in feet.
>
> Thanks,
> Rich
>

--
Justin Deoliveira
jdeolive@anonymised.com
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

On 1/21/07, Alexander Petkov <greenkov@anonymised.com> wrote:

Richard:

Which release are you using? We have a wiki page on a custom proj
definition in Geoserver, see if it helps:

http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver

You can view the details for srs definitions at:

http://localhost:8080/geoserver/srsHelp.do

Alex

Hello Alex,

Yes, I was just reading that page. I downloaded/installed geoserver
yesterday and I believe it is 1.4, and from what I can tell it uses
the non-HSQL projection definition system. (The only thing related to
epsg that I find in my lib is "gt2-epsg-wkt-2.2.3-SNAPSHOT.jar")

I'm still pretty suspicious that it's a feet/meters issue, but I'll
keep an eye out for Justin's findings from the geotools list.

Thanks,
Rich

--
Richard Greenwood
richard.greenwood@anonymised.com
www.greenwoodmap.com

Sorry, I forgot to include geoserver-users in my post to geotools. Explanation below.

Martin Desruisseaux wrote:

I think that Geoserver is still using the deprecated epsg-wkt plugin,
which defines EPSG codes there:

http://svn.geotools.org/geotools/trunk/gt/modules/plugin/epsg-wkt/src/main/resources/org/geotools/referencing/crs/epsg.properties

New code should uses the epsg-hsql plugin, which defines EPSG codes
there:

http://svn.geotools.org/geotools/trunk/gt/modules/plugin/epsg-hsql/src/main/resources/org/geotools/referencing/factory/epsg/EPSG.sql

In both cases, the units are correctly defined in feet as far as I can
see (Geotools can handle parameters in arbitrary units). Can you
provides a "System.out.println(crs)" of yours CRS please? We can see
from this dump which units are used.

  Martin

-------------------------------------------------------------------------
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
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

!DSPAM:1004,45b3ead1263221775926497!

--
Justin Deoliveira
jdeolive@anonymised.com
The Open Planning Project
http://topp.openplans.org

On 1/21/07, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Sorry, I forgot to include geoserver-users in my post to geotools.
Explanation below.

Martin Desruisseaux wrote:

> I think that Geoserver is still using the deprecated epsg-wkt plugin,
> which defines EPSG codes there:
>
> http://svn.geotools.org/geotools/trunk/gt/modules/plugin/epsg-wkt/src/main/resources/org/geotools/referencing/crs/epsg.properties
>
> New code should uses the epsg-hsql plugin, which defines EPSG codes
> there:
>
> http://svn.geotools.org/geotools/trunk/gt/modules/plugin/epsg-hsql/src/main/resources/org/geotools/referencing/factory/epsg/EPSG.sql
>
> In both cases, the units are correctly defined in feet as far as I can
> see (Geotools can handle parameters in arbitrary units). Can you
> provides a "System.out.println(crs)" of yours CRS please? We can see
> from this dump which units are used.
>
> Martin

It appears that geoserver 1.4 RC5 is using epsg-wkt. I am not very
strong with Java, so I not quite sure how to do a
"System.out.println(crs)" however I did:
   localhost:8080/geoserver/srsHelp.do
and got:

PROJCS["NAD27 / Wyoming West", GEOGCS["NAD27",
DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866", 6378206.4,
294.9786982138982, AUTHORITY["EPSG","7008"]], TOWGS84[-9.0, 151.0,
185.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6267"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree",
0.017453292519943295], AXIS["Lon", EAST], AXIS["Lat", NORTH],
AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"],
PARAMETER["central_meridian", -110.0833333333333],
PARAMETER["latitude_of_origin", 40.666666666666664],
PARAMETER["scale_factor", 0.999941177], PARAMETER["false_easting",
500000.0], PARAMETER["false_northing", 0.0], UNIT["[m*0.3048006]",
0.3048006], AXIS["X", EAST], AXIS["Y", NORTH],
AUTHORITY["EPSG","32058"]]

Notice that the false northing has a unit definition, but not the
easting. My data appears to be shifted quite a ways to the east, which
would be consistent with false easting (which is defined in feet,
above) being interpreted as meters.

I am not currently a member of geotools-gt2-users. Let me know if you
prefer to continue this thread there.

Thanks,
Rich

--
Richard Greenwood
richard.greenwood@anonymised.com
www.greenwoodmap.com

Notice that the false northing has a unit definition, but not the
easting. My data appears to be shifted quite a ways to the east, which
would be consistent with false easting (which is defined in feet,
above) being interpreted as meters.

The unit of measure for that srs is in feet. That unit is for both
northing and easting--match the opening and closing parenthesis and it
will become clear. I hope that wiki page helps if you want to define
your own.

I also have a simple community plugin (not comitted in the repository)
that lets one define additional codes using WKT in a text file
(piggy-backing on the wkt jar), but it looks like I should retool it
to make inserts in the HSQL database.

Alex

On 1/21/07, Alexander Petkov <greenkov@anonymised.com> wrote:

> Notice that the false northing has a unit definition, but not the
> easting. My data appears to be shifted quite a ways to the east, which
> would be consistent with false easting (which is defined in feet,
> above) being interpreted as meters.

The unit of measure for that srs is in feet. That unit is for both
northing and easting--match the opening and closing parenthesis and it
will become clear. I hope that wiki page helps if you want to define
your own.

Yes, you are quite correct, it is in feet. I mis-read the WKT. I will
have to examine my problem more closely. Perhaps I have my srs defined
incorrectly in my postgis datastore.

Thanks,
Rich

--
Richard Greenwood
richard.greenwood@anonymised.com
www.greenwoodmap.com

Le dimanche 21 janvier 2007 à 19:58 -0700, Alexander Petkov a écrit :

I also have a simple community plugin (not comitted in the repository)
that lets one define additional codes using WKT in a text file
(piggy-backing on the wkt jar), but it looks like I should retool it
to make inserts in the HSQL database.

Not necessarly. WKT is a valid way to define additional CRS if peoples
wish. It is just a too restrictive format for the particular case of
EPSG database.

On Geotools trunk (for 2.4 release), there is some support for adding
custom CRS. The work take place in unsupported/epsg-ext but is not yet
finished. Once finished, your community plugin could insert WKT there.

  Martin

Le dimanche 21 janvier 2007 à 20:04 -0700, Richard Greenwood a écrit :

Yes, you are quite correct, it is in feet. I mis-read the WKT. I will
have to examine my problem more closely. Perhaps I have my srs defined
incorrectly in my postgis datastore.

Can you have an estimation about how much meters the shift is? It may
help us to check if a unit conversion problem can explain the shift or
not.

By the way, is the shift constant for every points?

  Martin