[Geoserver-users] Try to add/correct a Projection in Geoserver

Hello Everybody

I try to add/correct a Projection in Geoserver an I used the following
link (you will see in Chris mail). I uncompress the gt2-epsg.jar file
as described, but there are no directory called
org/geotools/referencing/crs/. Is there any changes between described
release (1.3.0) and the release (1.3.4) is use?

Thank you.
Regards, Thomas

2006/10/27, Chris Holmes <cholmes@anonymised.com>:

Do you have the well known text for your srs? It seems like it should
be a standard one already in the database, but you can add it -
instrucions here:
http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver
(though I think the second set is now the standard way).

It's odd that it works properly in udig and not geoserver, as they use
the same code. Maybe you can see the epsg code in there, and then you
have to fill it out properly in GeoServer?

Chris

Thomas Zuberbuehler wrote:
> Hello Everybody.
>
> I tried it also with SRS 2056 and 480, thus all named with CH1903.
> With SRS 2056 the data are shown, but around approximately 45 degrees
> the counterclockwise. It is always the same, either the coordinates
> are wrongly transformed (for example -17/-85 for an area in Europe!)
> or simply 0/90.
>
> Who can help? What wrong do I make?
>
> Thank you.
> Thomas
>
> 2006/10/27, Thomas Zuberbuehler <tzuberbuehler@anonymised.com>:
>> Hello
>>
>> I have a problem to create a FeatureType with my data. The data stored
>> in a shape file and in CH1903/LV03 as Spatial Referencing System. This
>> is a swiss coordinate system. So I tried with SRS 21780, 21781, 4149
>> and 4150 with no solution.
>>
>> How can help? If there a (transformation) problem on side of geoserver
>> or will I made something wrong?
>>
>> Thank you.
>> Regards, Thomas
>>
>> PS. The same shape file will be correct and shown with uDig.
>>
>> --
>> Thomas Zuberbuehler
>> http://www.zubi.li
>>
>

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

--
Thomas Zuberbuehler
http://www.zubi.li

I found my own mistake. I uncompressed the wrong jar file. *shame*

But I have an other problem, I added a new entry in epsg.properties,
deleted this hsql database and I made a restart of the tomcat. Now,
when I will use this new EPSG number nothing will happened.

I will get following error message: Could not find a definition for: EPSG:104306

Thank you.
Thomas

---------- Forwarded message ----------
From: Thomas Zuberbuehler <tzuberbuehler@anonymised.com>
Date: 30.10.2006 12:05
Subject: Try to add/correct a Projection in Geoserver
To: geoserver-users@lists.sourceforge.net

Hello Everybody

I try to add/correct a Projection in Geoserver an I used the following
link (you will see in Chris mail). I uncompress the gt2-epsg.jar file
as described, but there are no directory called
org/geotools/referencing/crs/. Is there any changes between described
release (1.3.0) and the release (1.3.4) is use?

Thank you.
Regards, Thomas

2006/10/27, Chris Holmes <cholmes@anonymised.com>:

Do you have the well known text for your srs? It seems like it should
be a standard one already in the database, but you can add it -
instrucions here:
http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver
(though I think the second set is now the standard way).

It's odd that it works properly in udig and not geoserver, as they use
the same code. Maybe you can see the epsg code in there, and then you
have to fill it out properly in GeoServer?

Chris

Thomas Zuberbuehler wrote:
> Hello Everybody.
>
> I tried it also with SRS 2056 and 480, thus all named with CH1903.
> With SRS 2056 the data are shown, but around approximately 45 degrees
> the counterclockwise. It is always the same, either the coordinates
> are wrongly transformed (for example -17/-85 for an area in Europe!)
> or simply 0/90.
>
> Who can help? What wrong do I make?
>
> Thank you.
> Thomas
>
> 2006/10/27, Thomas Zuberbuehler <tzuberbuehler@anonymised.com>:
>> Hello
>>
>> I have a problem to create a FeatureType with my data. The data stored
>> in a shape file and in CH1903/LV03 as Spatial Referencing System. This
>> is a swiss coordinate system. So I tried with SRS 21780, 21781, 4149
>> and 4150 with no solution.
>>
>> How can help? If there a (transformation) problem on side of geoserver
>> or will I made something wrong?
>>
>> Thank you.
>> Regards, Thomas
>>
>> PS. The same shape file will be correct and shown with uDig.
>>
>> --
>> Thomas Zuberbuehler
>> http://www.zubi.li
>>
>

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

--
Thomas Zuberbuehler
http://www.zubi.li

--
Thomas Zuberbuehler
http://www.zubi.li

But I have an other problem, I added a new entry in epsg.properties....

Did you compress the wkt jar again with the modified epsg.properties (Step 6)?
Alex

On 10/30/06, Thomas Zuberbuehler <tzuberbuehler@anonymised.com> wrote:

Following the wkt string for CH1903/LV03 (EPSG:21781) from PostGIS.
Its a different one to 21781 from GeoServer.

<code>

PROJCS["CH1903 / LV03",
  GEOGCS["CH1903",
    DATUM["CH1903",
      SPHEROID["Bessel 1841",6377397.155,299.1528128,
        AUTHORITY["EPSG","7004"]
      ],
      AUTHORITY["EPSG","6149"]
    ],
    PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.01745329251994328,
      AUTHORITY["EPSG","9122"]
    ],
    AUTHORITY["EPSG","4149"]
  ],
  PROJECTION["Hotine_Oblique_Mercator"],
  PARAMETER["latitude_of_center",46.95240555555556],
  PARAMETER["longitude_of_center",7.439583333333333],
  PARAMETER["azimuth",90],
  PARAMETER["rectified_grid_angle",90],
  PARAMETER["scale_factor",1],
  PARAMETER["false_easting",600000],
  PARAMETER["false_northing",200000],
  UNIT["metre",1,AUTHORITY["EPSG","9001"]],
  AUTHORITY["EPSG","21781"]
]
+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333
+x_0=600000 +y_0=200000 +ellps=bessel +units=m +no_defs

</code>

The last 2 lines are proj4 text, you do not need that. Probably that's
why it didn't parse.

Just use the srtext string from the spatial_ref_sys table. You can add
this to the epsg.properties file:

45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]

Explanation:
45555 is a code that I came up with. Change it to something that makes
sense to you.
Also, I am not certain if the entry really needs to be all on one
line--you can try it and tell me.

Alex

---------- Forwarded message ----------
From: Thomas Zuberbuehler <tzuberbuehler@anonymised.com>
Date: 30.10.2006 17:21
Subject: Re: [Geoserver-users] Fwd: Try to add/correct a Projection in Geoserver
To: Alexander Petkov <greenkov@anonymised.com>

I add your wkt string to epsg.properties, compress it again and
restart my server. But nothing happened. If I create a new feature
type with geoserver webinterface I will get:
Could not find a definition for: EPSG:45555

Thomas

2006/10/30, Alexander Petkov <greenkov@anonymised.com>:

On 10/30/06, Thomas Zuberbuehler <tzuberbuehler@anonymised.com> wrote:
> Following the wkt string for CH1903/LV03 (EPSG:21781) from PostGIS.
> Its a different one to 21781 from GeoServer.
>
> <code>
>
> PROJCS["CH1903 / LV03",
> GEOGCS["CH1903",
> DATUM["CH1903",
> SPHEROID["Bessel 1841",6377397.155,299.1528128,
> AUTHORITY["EPSG","7004"]
> ],
> AUTHORITY["EPSG","6149"]
> ],
> PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
> UNIT["degree",0.01745329251994328,
> AUTHORITY["EPSG","9122"]
> ],
> AUTHORITY["EPSG","4149"]
> ],
> PROJECTION["Hotine_Oblique_Mercator"],
> PARAMETER["latitude_of_center",46.95240555555556],
> PARAMETER["longitude_of_center",7.439583333333333],
> PARAMETER["azimuth",90],
> PARAMETER["rectified_grid_angle",90],
> PARAMETER["scale_factor",1],
> PARAMETER["false_easting",600000],
> PARAMETER["false_northing",200000],
> UNIT["metre",1,AUTHORITY["EPSG","9001"]],
> AUTHORITY["EPSG","21781"]
> ]
> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333
> +x_0=600000 +y_0=200000 +ellps=bessel +units=m +no_defs
>
> </code>

The last 2 lines are proj4 text, you do not need that. Probably that's
why it didn't parse.

Just use the srtext string from the spatial_ref_sys table. You can add
this to the epsg.properties file:

45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]

Explanation:
45555 is a code that I came up with. Change it to something that makes
sense to you.
Also, I am not certain if the entry really needs to be all on one
line--you can try it and tell me.

Alex

--
Thomas Zuberbuehler
http://www.zubi.li

--
Thomas Zuberbuehler
http://www.zubi.li

45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]

>
> Explanation:
> 45555 is a code that I came up with. Change it to something that makes
> sense to you.
> Also, I am not certain if the entry really needs to be all on one
> line--you can try it and tell me.

Aah, forgot to add the authority at the end:

45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1],AUTHORITY["EPSG","45555"]]

It seems to work here, see attached image.

Alex

srsHelp.gif

Alex,

Thank you for your help!!! I tried it with an other test server (xampp
and tomcat) and it will be work. I don't know why not with my other
installation (only tomcat), perhaps a setting inside eclipse.

Regards, Thomas

2006/10/30, Thomas Zuberbuehler <tzuberbuehler@anonymised.com>:

---------- Forwarded message ----------
From: Thomas Zuberbuehler <tzuberbuehler@anonymised.com>
Date: 30.10.2006 17:21
Subject: Re: [Geoserver-users] Fwd: Try to add/correct a Projection in Geoserver
To: Alexander Petkov <greenkov@anonymised.com>

I add your wkt string to epsg.properties, compress it again and
restart my server. But nothing happened. If I create a new feature
type with geoserver webinterface I will get:
Could not find a definition for: EPSG:45555

Thomas

2006/10/30, Alexander Petkov <greenkov@anonymised.com>:
> On 10/30/06, Thomas Zuberbuehler <tzuberbuehler@anonymised.com> wrote:
> > Following the wkt string for CH1903/LV03 (EPSG:21781) from PostGIS.
> > Its a different one to 21781 from GeoServer.
> >
> > <code>
> >
> > PROJCS["CH1903 / LV03",
> > GEOGCS["CH1903",
> > DATUM["CH1903",
> > SPHEROID["Bessel 1841",6377397.155,299.1528128,
> > AUTHORITY["EPSG","7004"]
> > ],
> > AUTHORITY["EPSG","6149"]
> > ],
> > PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
> > UNIT["degree",0.01745329251994328,
> > AUTHORITY["EPSG","9122"]
> > ],
> > AUTHORITY["EPSG","4149"]
> > ],
> > PROJECTION["Hotine_Oblique_Mercator"],
> > PARAMETER["latitude_of_center",46.95240555555556],
> > PARAMETER["longitude_of_center",7.439583333333333],
> > PARAMETER["azimuth",90],
> > PARAMETER["rectified_grid_angle",90],
> > PARAMETER["scale_factor",1],
> > PARAMETER["false_easting",600000],
> > PARAMETER["false_northing",200000],
> > UNIT["metre",1,AUTHORITY["EPSG","9001"]],
> > AUTHORITY["EPSG","21781"]
> > ]
> > +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333
> > +x_0=600000 +y_0=200000 +ellps=bessel +units=m +no_defs
> >
> > </code>
>
> The last 2 lines are proj4 text, you do not need that. Probably that's
> why it didn't parse.
>
> Just use the srtext string from the spatial_ref_sys table. You can add
> this to the epsg.properties file:
>
> 45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]
>
> Explanation:
> 45555 is a code that I came up with. Change it to something that makes
> sense to you.
> Also, I am not certain if the entry really needs to be all on one
> line--you can try it and tell me.
>
> Alex
>

--
Thomas Zuberbuehler
http://www.zubi.li

--
Thomas Zuberbuehler
http://www.zubi.li

--
Thomas Zuberbuehler
http://www.zubi.li

Hi Alexander

I hope your are still at this mailinglist. I have a question to a
message from you to me last october. Where do you have following WKT
string?

This string works, but there are a position offset. GeoServer and
GeoTools do still a wrong transformation since months, but I did not
yet found out the reason.

Thank you.
Regards, Thomas

2006/10/30, Alexander Petkov <greenkov@anonymised.com>:

45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]
> >
> > Explanation:
> > 45555 is a code that I came up with. Change it to something that makes
> > sense to you.
> > Also, I am not certain if the entry really needs to be all on one
> > line--you can try it and tell me.

Aah, forgot to add the authority at the end:

45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1],AUTHORITY["EPSG","45555"]]

It seems to work here, see attached image.

Alex

--
Thomas Zuberbuehler
http://www.zubi.li

Yes, I am still here :slight_smile: I will refresh my brain on the issue and I
will get back to you.

Alex

On 2/22/07, Thomas Zuberbuehler <tzuberbuehler@anonymised.com> wrote:

Hi Alexander

I hope your are still at this mailinglist. I have a question to a
message from you to me last october. Where do you have following WKT
string?

This string works, but there are a position offset. GeoServer and
GeoTools do still a wrong transformation since months, but I did not
yet found out the reason.

Thank you.
Regards, Thomas

2006/10/30, Alexander Petkov <greenkov@anonymised.com>:
> 45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]
> > >
> > > Explanation:
> > > 45555 is a code that I came up with. Change it to something that makes
> > > sense to you.
> > > Also, I am not certain if the entry really needs to be all on one
> > > line--you can try it and tell me.
>
> Aah, forgot to add the authority at the end:
>
> 45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1],AUTHORITY["EPSG","45555"]]
>
> It seems to work here, see attached image.
>
> Alex
>

--
Thomas Zuberbuehler
http://www.zubi.li

Have you changed Geoserver versions? With 1.5.x it has been necessary
to add the following argument on startup:

-Dorg.geotools.referencing.forceXY=true

Alex

On 2/22/07, Alexander Petkov <greenkov@anonymised.com> wrote:

Yes, I am still here :slight_smile: I will refresh my brain on the issue and I
will get back to you.

Alex

On 2/22/07, Thomas Zuberbuehler <tzuberbuehler@anonymised.com> wrote:
> Hi Alexander
>
> I hope your are still at this mailinglist. I have a question to a
> message from you to me last october. Where do you have following WKT
> string?
>
> This string works, but there are a position offset. GeoServer and
> GeoTools do still a wrong transformation since months, but I did not
> yet found out the reason.
>
> Thank you.
> Regards, Thomas
>
> 2006/10/30, Alexander Petkov <greenkov@anonymised.com>:
> > 45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]
> > > >
> > > > Explanation:
> > > > 45555 is a code that I came up with. Change it to something that makes
> > > > sense to you.
> > > > Also, I am not certain if the entry really needs to be all on one
> > > > line--you can try it and tell me.
> >
> > Aah, forgot to add the authority at the end:
> >
> > 45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1],AUTHORITY["EPSG","45555"]]
> >
> > It seems to work here, see attached image.
> >
> > Alex
> >
>
> --
> Thomas Zuberbuehler
> http://www.zubi.li
>

What's the status with the forceXY true? Weren't we talking about setting it programmatically on geoserver start-up? Did that happen? Do we still want to do it? We should make a JIRA issue if so.

Chris

Alexander Petkov wrote:

Have you changed Geoserver versions? With 1.5.x it has been necessary
to add the following argument on startup:

-Dorg.geotools.referencing.forceXY=true

Alex

On 2/22/07, Alexander Petkov <greenkov@anonymised.com> wrote:

Yes, I am still here :slight_smile: I will refresh my brain on the issue and I
will get back to you.

Alex

On 2/22/07, Thomas Zuberbuehler <tzuberbuehler@anonymised.com> wrote:

Hi Alexander

I hope your are still at this mailinglist. I have a question to a
message from you to me last october. Where do you have following WKT
string?

This string works, but there are a position offset. GeoServer and
GeoTools do still a wrong transformation since months, but I did not
yet found out the reason.

Thank you.
Regards, Thomas

2006/10/30, Alexander Petkov <greenkov@anonymised.com>:

45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]

Explanation:
45555 is a code that I came up with. Change it to something that makes
sense to you.
Also, I am not certain if the entry really needs to be all on one
line--you can try it and tell me.

Aah, forgot to add the authority at the end:

45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1],AUTHORITY["EPSG","45555"]]

It seems to work here, see attached image.

Alex

--
Thomas Zuberbuehler
http://www.zubi.li

-------------------------------------------------------------------------
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:1003,45df082e198972051017194!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Chris Holmes ha scritto:

What's the status with the forceXY true? Weren't we talking about setting it programmatically on geoserver start-up? Did that happen?
Do we still want to do it? We should make a JIRA issue if so.

It did happen, Geosever 1.5.0rc1 ships with that flag on by default
for sure (maybe even beta2, not sure). The code is attached to the Config object creation in the spring context (that is, it happens on startup):

if (System.getProperty("org.geotools.referencing.forceXY") == null) {
             System.setProperty("org.geotools.referencing.forceXY", "true");
         }

So, if you did not set forcexy otherwise, it'll be set to true.

Cheers
Andrea

Hi Alex

I use Geoserve 1.4.x.

«The axis order of CH1903/LV03 is y, x (east, north). In this reference
system is y=x and x=y. This can be a little confused.» So there is a
(latitude, longitude) order. I think I have not to set your suggested
argument, have I??

I am confused. There are so many different wkt string. I put them in a
document ( http://www.nabble.com/file/6782/EPSG21781-Vergleich.pdf
EPSG21781-Vergleich.pdf ) and compared them. I don't know if there an
invalid calculate in the gt classes or if there an invalid wkt string? I get
every time a wrong transformation.

There is a second thread about this case opened:
http://www.nabble.com/Transformation-between-CH1903-LV03-and-WGS84-tf3273159.html
Link to thread on Nabble .

Thank you.
Thomas

PS. http://en.wikipedia.org/wiki/Swiss_coordinate_system Wikipedia: «The
map projection [of CH1903/LV03] used is Oblique Mercator on a 1841 Bessel
ellipsoid.»

Alexander Petkov wrote:

Have you changed Geoserver versions? With 1.5.x it has been necessary
to add the following argument on startup:

-Dorg.geotools.referencing.forceXY=true

Alex

On 2/22/07, Alexander Petkov <greenkov@anonymised.com> wrote:

Yes, I am still here :slight_smile: I will refresh my brain on the issue and I
will get back to you.

Alex

On 2/22/07, Thomas Zuberbuehler <tzuberbuehler@anonymised.com> wrote:
> Hi Alexander
>
> I hope your are still at this mailinglist. I have a question to a
> message from you to me last october. Where do you have following WKT
> string?
>
> This string works, but there are a position offset. GeoServer and
> GeoTools do still a wrong transformation since months, but I did not
> yet found out the reason.
>
> Thank you.
> Regards, Thomas
>
> 2006/10/30, Alexander Petkov <greenkov@anonymised.com>:
> >
45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]]
> > > >
> > > > Explanation:
> > > > 45555 is a code that I came up with. Change it to something that
makes
> > > > sense to you.
> > > > Also, I am not certain if the entry really needs to be all on one
> > > > line--you can try it and tell me.
> >
> > Aah, forgot to add the authority at the end:
> >
> >
45555=PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000],PARAMETER["False_Northing",200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1],AUTHORITY["EPSG","45555"]]
> >
> > It seems to work here, see attached image.
> >
> > Alex
> >
> >
> >
>
>
> --
> Thomas Zuberbuehler
> http://www.zubi.li
>

-------------------------------------------------------------------------
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/Try-to-add-correct-a-Projection-in-Geoserver-tf2538593.html#a9156891
Sent from the GeoServer - User mailing list archive at Nabble.com.

Thomas Zuberbühler ha scritto:

Hi Alex

I use Geoserve 1.4.x.

Geoserver 1.4.x does not have bursa wolf parameters included, that's probably why you're getting projection errors (this is confirmed by your PDF, the geoserver stuff does not have the TOWGS84 elements).

In 1.5.x we switched to the official EPSG database, that has full parameters, but unfortunately does not include the 21781 projection.
You have a couple of options:
* keep 1.4.0, and follow the instructions to add a new projection to
   it, just that instead of adding one, you'll replace the existing
   21781 string with the one coming from postgis. See: http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver+1.3+and+1.4
* switch to 1.5.0rc2 as soon as it's released (recommended) and
   then use the new, easier method for adding a new projection (this time
   you'll have to add it since the official EPSG database does not
   contain it):
http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver+1.5.0+(onwards)

Theoretically we should have kept the same list of projections as the
old Geoserver, but it seems some have been dropped along during the road. I'm investigating why this happened, sorry for the inconvenience.

«The axis order of CH1903/LV03 is y, x (east, north). In this reference
system is y=x and x=y. This can be a little confused.» So there is a
(latitude, longitude) order. I think I have not to set your suggested
argument, have I??

Hmm... Geoserver 1.4.0 always works with lon/lat axis, never the opposite. The difference between the user interface and the file
shown in your pdf is only because Geoserver does not publishes the
wkt verbatim, it parses the wkt, adds infos to the projections and
then rebuilds the wkt. That's why the Geoserver output shows explicitly
the axis order. Every CRS comingn from the wkt file is treated as x/y,
east/north, lon/lat.

I am confused. There are so many different wkt string. I put them in a
document ( http://www.nabble.com/file/6782/EPSG21781-Vergleich.pdf
EPSG21781-Vergleich.pdf ) and compared them. I don't know if there an
invalid calculate in the gt classes or if there an invalid wkt string? I get
every time a wrong transformation.

There are no invalid wkt strings there, just one that is more complete
than the others. The TOWGS84 parameters are important for accurate
reprojection.
That said, what is the error you're getting? Under 100 meters, or other side of the planet?

Cheers
Andrea

Hi Andrea

Thank you for your detailed response.

The wkt string (first one in my PDF) from Postgis made a correct
transformation on database level. So I guess this is a valid wkt string as
you say. When I use this wkt string in GeoServer (as described in your given
URL) there is still an invalid transformation! From this it follows that I
guess there must be a wrong calculation in gt classes!

Instead of I get some point as 47.43... and 7.74... I get a point like
-82.71... and 0.3188.

Thomas

aaime wrote:

Thomas Zuberbühler ha scritto:

Hi Alex

I use Geoserve 1.4.x.

Geoserver 1.4.x does not have bursa wolf parameters included, that's
probably why you're getting projection errors (this is confirmed by your
PDF, the geoserver stuff does not have the TOWGS84 elements).

In 1.5.x we switched to the official EPSG database, that has full
parameters, but unfortunately does not include the 21781 projection.
You have a couple of options:
* keep 1.4.0, and follow the instructions to add a new projection to
   it, just that instead of adding one, you'll replace the existing
   21781 string with the one coming from postgis. See:
http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver+1.3+and+1.4
* switch to 1.5.0rc2 as soon as it's released (recommended) and
   then use the new, easier method for adding a new projection (this time
   you'll have to add it since the official EPSG database does not
   contain it):
http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver+1.5.0+(onwards)

Theoretically we should have kept the same list of projections as the
old Geoserver, but it seems some have been dropped along during the
road. I'm investigating why this happened, sorry for the inconvenience.

«The axis order of CH1903/LV03 is y, x (east, north). In this reference
system is y=x and x=y. This can be a little confused.» So there is a
(latitude, longitude) order. I think I have not to set your suggested
argument, have I??

Hmm... Geoserver 1.4.0 always works with lon/lat axis, never the
opposite. The difference between the user interface and the file
shown in your pdf is only because Geoserver does not publishes the
wkt verbatim, it parses the wkt, adds infos to the projections and
then rebuilds the wkt. That's why the Geoserver output shows explicitly
the axis order. Every CRS comingn from the wkt file is treated as x/y,
east/north, lon/lat.

I am confused. There are so many different wkt string. I put them in a
document ( http://www.nabble.com/file/6782/EPSG21781-Vergleich.pdf
EPSG21781-Vergleich.pdf ) and compared them. I don't know if there an
invalid calculate in the gt classes or if there an invalid wkt string? I
get
every time a wrong transformation.

There are no invalid wkt strings there, just one that is more complete
than the others. The TOWGS84 parameters are important for accurate
reprojection.
That said, what is the error you're getting? Under 100 meters, or other
side of the planet?

Cheers
Andrea

-------------------------------------------------------------------------
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/Try-to-add-correct-a-Projection-in-Geoserver-tf2538593.html#a9162051
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Andrea

I am not absolutely sure but I guess that the transformation problem is now
solved from Martin Desruisseaux. He added an alias for "Scale factor on
initial line" in revision 24563. With my JUnit test the transformation done
correctly.

See also here:
http://www.nabble.com/Transformation-between-CH1903-LV03-and-WGS84-tf3273159.html
Geotools Mailinglist (Transformation between CH1903/LV03 and WGS84)

I saw that you opened a Jira Task with priority "critical" to find the
forgiven EPSG codes. Thank you. Perhaps It will help you: my PostGIS version
is 1.1.6.

geoserver=# select postgis_version();
            postgis_version
---------------------------------------
1.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1

Thank you for your help!
Regards, Thomas

aaime wrote:

Thomas Zuberbühler ha scritto:

Hi Alex

I use Geoserve 1.4.x.

Geoserver 1.4.x does not have bursa wolf parameters included, that's
probably why you're getting projection errors (this is confirmed by your
PDF, the geoserver stuff does not have the TOWGS84 elements).

In 1.5.x we switched to the official EPSG database, that has full
parameters, but unfortunately does not include the 21781 projection.
You have a couple of options:
* keep 1.4.0, and follow the instructions to add a new projection to
   it, just that instead of adding one, you'll replace the existing
   21781 string with the one coming from postgis. See:
http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver+1.3+and+1.4
* switch to 1.5.0rc2 as soon as it's released (recommended) and
   then use the new, easier method for adding a new projection (this time
   you'll have to add it since the official EPSG database does not
   contain it):
http://docs.codehaus.org/display/GEOSDOC/Custom+projection+definition+in+Geoserver+1.5.0+(onwards)

Theoretically we should have kept the same list of projections as the
old Geoserver, but it seems some have been dropped along during the
road. I'm investigating why this happened, sorry for the inconvenience.

«The axis order of CH1903/LV03 is y, x (east, north). In this reference
system is y=x and x=y. This can be a little confused.» So there is a
(latitude, longitude) order. I think I have not to set your suggested
argument, have I??

Hmm... Geoserver 1.4.0 always works with lon/lat axis, never the
opposite. The difference between the user interface and the file
shown in your pdf is only because Geoserver does not publishes the
wkt verbatim, it parses the wkt, adds infos to the projections and
then rebuilds the wkt. That's why the Geoserver output shows explicitly
the axis order. Every CRS comingn from the wkt file is treated as x/y,
east/north, lon/lat.

I am confused. There are so many different wkt string. I put them in a
document ( http://www.nabble.com/file/6782/EPSG21781-Vergleich.pdf
EPSG21781-Vergleich.pdf ) and compared them. I don't know if there an
invalid calculate in the gt classes or if there an invalid wkt string? I
get
every time a wrong transformation.

There are no invalid wkt strings there, just one that is more complete
than the others. The TOWGS84 parameters are important for accurate
reprojection.
That said, what is the error you're getting? Under 100 meters, or other
side of the planet?

Cheers
Andrea

-------------------------------------------------------------------------
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/Try-to-add-correct-a-Projection-in-Geoserver-tf2538593.html#a9180130
Sent from the GeoServer - User mailing list archive at Nabble.com.