[Geoserver-devel] Re: Advertise layers in SRS 54004 (T mercator)

Hello again.
Looking at the proj4 parameters you sent me, I interpret the following:

latutute of origin=0
Prime meridian=0
scale factor=1.00000
false easting=0
false northing=0
spheroid: "WGS_1984"
datum: "WGS_1984"
units: meters

Then the wkt has to be constructed and added into epsg.properties:
54004=PROJCS["WGS84 / C. Holmes
Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",
6378137.0, 298.257223563]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4604"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1.0000],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","54004"]]

From what I see is that double quoted text is just a string
descriptor. The numeric value(s) that follows that descriptor is the
important part.

I haven't tried inserting this wkt and re-creating the gt2-epsg.jar.
If it cannot be parsed for some reason, it will not show in the
srsHelp.do list.

Also, I think that the Mercator projection with EPSG code 41001 in
geoserver's epsg.properties may actually be the projection you are
looking for. It has the name "WGS84 / Simple Mercator".

BTW, I was thinking about creating a web interface for users (well,
admins with a password), as a method for custom projection definition.
If I think in terms of the WCS branch, it looks pretty straight
forward, since it uses HSQLDB. I have also come up with INSERT
statements for creating a custom projection.

For the main branch, the same idea appears to be more difficult to
implement. Since a flat file is used, it seems that the jar will have
to be unpacked, flat file opened and edited, and then the archive
recreated. Not pretty. But as always, i would love to be wrong about
this and be pointed in the right direction.

Alex

On 5/15/06, Chris Holmes <cholmes@...13...> wrote:

Hey, I'm trying to figure out how to add mercator by default, since this
should be useful to a lot of people. But I don't really understand any
of this projection stuff. The snipped on this guy's blog is to add to
Proj4, and says:

<54004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0
+ellps=WGS84 +datum=WGS84 +units=m no_defs <>

So how do I go from that in to your examples? Or how do I get this the
mercator projection that works with Google Maps in GeoServer?

We're getting some really good kml support in, and I'd like to also have
people be able to easily overlay their wms maps on gmaps as well.

thanks!

Chris

Alexander Petkov wrote:

Hello again.
Looking at the proj4 parameters you sent me, I interpret the following:

latutute of origin=0
Prime meridian=0
scale factor=1.00000
false easting=0
false northing=0
spheroid: "WGS_1984"
datum: "WGS_1984"
units: meters

Then the wkt has to be constructed and added into epsg.properties:
54004=PROJCS["WGS84 / C. Holmes
Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",
6378137.0, 298.257223563]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4604"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1.0000],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","54004"]]

From what I see is that double quoted text is just a string
descriptor. The numeric value(s) that follows that descriptor is the
important part.

I haven't tried inserting this wkt and re-creating the gt2-epsg.jar.
If it cannot be parsed for some reason, it will not show in the
srsHelp.do list.

Also, I think that the Mercator projection with EPSG code 41001 in
geoserver's epsg.properties may actually be the projection you are
looking for. It has the name "WGS84 / Simple Mercator".

Cool. I'm seeing if a few users can try out that EPSG code, and then we can just make a concrete recommendation for them. It'd be a lot less hacky. But if it doesn't work out we can just add it as an extra.

BTW, I was thinking about creating a web interface for users (well,
admins with a password), as a method for custom projection definition.
If I think in terms of the WCS branch, it looks pretty straight
forward, since it uses HSQLDB. I have also come up with INSERT
statements for creating a custom projection.

That'd be great. I think we could consider moving over to hsqldb, since it seems silly that we've got parallel versions going. So I'd say just focus on that one, and this will give us more motivation to move over to it.

Chris

For the main branch, the same idea appears to be more difficult to
implement. Since a flat file is used, it seems that the jar will have
to be unpacked, flat file opened and edited, and then the archive
recreated. Not pretty. But as always, i would love to be wrong about
this and be pointed in the right direction.

Alex

On 5/15/06, Chris Holmes <cholmes@anonymised.com> wrote:

Hey, I'm trying to figure out how to add mercator by default, since this
should be useful to a lot of people. But I don't really understand any
of this projection stuff. The snipped on this guy's blog is to add to
Proj4, and says:

<54004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0
+ellps=WGS84 +datum=WGS84 +units=m no_defs <>

So how do I go from that in to your examples? Or how do I get this the
mercator projection that works with Google Maps in GeoServer?

We're getting some really good kml support in, and I'd like to also have
people be able to easily overlay their wms maps on gmaps as well.

thanks!

Chris

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