[Geoserver-devel] Google projection, first cut in

Hi,
thanks to the pointers gave me by Tim Shaub I was able
to get in an apparently good Google projection support.

The projection is basically 41001 (WGS84/Simple Mercator),
but lat/lon on the ellipsoid have to be assumed as spherical coordiantes, without the value changes the reprojection module
would do. To get this, I had to roll a new projection
class, which is basically a slight variation of Mercator1SP
that ignores the eccentricity.
For the moment I've committed it to Geoserver trunk,
but I would like to have it in gt2 (especially because
I had to extend some package private class, and thus
I had to put the class in the same package).

The projection is not enough, we need an EPSG code too.
I assigned 100003 to it, because it was the first free,
and added the associated WKT in the user.projections
file... and this is the real issue, old installations
of Geoserver won't have this code. We will have to
tell people to add it.

To compensate for that and for eventual clashes with
the chosen code, I added a new parameter to wms-gs.js,
var EPSG_GOOGLE_CODE = "EPSG:100003"
this will allow people to use their code of choice.

Anyways, people, updated your trunk checkout,
try whatever map you fancy, and tell me if it's working
ok for you.

Cheers
Andrea

To compensate for that and for eventual clashes with
the chosen code, I added a new parameter to wms-gs.js,
var EPSG_GOOGLE_CODE = "EPSG:100003"
this will allow people to use their code of choice.

Something worth noting is that 100003 is probably the same code that a user would use when adding their own projection... so if we release and clobber this code it could potentially break them... I am not sure what the behavior will be if there are two identical codes which map to different crs's.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4007,46b35f6591401015089218!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

If we want to have a little hax0r joke we could call it 900913
Also might want to do it as 54004 to be inline with what Chris Schmidt is doing. I think I saw him use it in an example. We should standardize, so we can support openlayers google layer well.

Chris

Andrea Aime wrote:

Hi,
thanks to the pointers gave me by Tim Shaub I was able
to get in an apparently good Google projection support.

The projection is basically 41001 (WGS84/Simple Mercator),
but lat/lon on the ellipsoid have to be assumed as spherical coordiantes, without the value changes the reprojection module
would do. To get this, I had to roll a new projection
class, which is basically a slight variation of Mercator1SP
that ignores the eccentricity.
For the moment I've committed it to Geoserver trunk,
but I would like to have it in gt2 (especially because
I had to extend some package private class, and thus
I had to put the class in the same package).

The projection is not enough, we need an EPSG code too.
I assigned 100003 to it, because it was the first free,
and added the associated WKT in the user.projections
file... and this is the real issue, old installations
of Geoserver won't have this code. We will have to
tell people to add it.

To compensate for that and for eventual clashes with
the chosen code, I added a new parameter to wms-gs.js,
var EPSG_GOOGLE_CODE = "EPSG:100003"
this will allow people to use their code of choice.

Anyways, people, updated your trunk checkout,
try whatever map you fancy, and tell me if it's working
ok for you.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4005,46b35f6691394901796417!

Chris Holmes ha scritto:

If we want to have a little hax0r joke we could call it 900913

Hem... sorry? I must miss something here :slight_smile:

Also might want to do it as 54004 to be inline with what Chris Schmidt is doing.

This one is wrong, I mean, I don't see any sizeable difference
between 54004 and 41001. They have a different definition for
the Google projection, and the WKT can't be used because...
it assumes your parser can parse the proj extensions.

http://www.spatialreference.org/ref/epsg/54004
http://www.spatialreference.org/ref/user/google-projection/

They did not assign a number to the Google one, and we need
a number.

On monday I plan to add a demo with NY tiger data, and one
with Spearfish data, to see how well we align to the
road crossings.

Cheers
Andrea

Just tried it out and it works great.

I think we should consider doing 1.5.2a, to get this fix in, and to get filters in KML in. Also on my 1.5.x I'm not getting metaTiling on the google maps demo working correctly. It does work on the latest 1.6.x with the new mercator though.

Andrea Aime wrote:

Chris Holmes ha scritto:

If we want to have a little hax0r joke we could call it 900913

Hem... sorry? I must miss something here :slight_smile:

Are you some kind of n00b? I guess you're not 1337

http://www.urbandictionary.com/define.php?term=1337

9 = g
0 = o
1 = l
3 = e

Also might want to do it as 54004 to be inline with what Chris Schmidt is doing.

This one is wrong, I mean, I don't see any sizeable difference
between 54004 and 41001. They have a different definition for
the Google projection, and the WKT can't be used because...
it assumes your parser can parse the proj extensions.

http://www.spatialreference.org/ref/epsg/54004
http://www.spatialreference.org/ref/user/google-projection/

They did not assign a number to the Google one, and we need
a number.

Yeah. Hopefully we can come up with something soon, just some agreed upon number we'll both use.

On monday I plan to add a demo with NY tiger data, and one
with Spearfish data, to see how well we align to the
road crossings.

I may try that right now...

Chris

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4005,46b37f0c127093668746562!

Chris Holmes ha scritto:

Just tried it out and it works great.

I think we should consider doing 1.5.2a, to get this fix in, and to get filters in KML in. Also on my 1.5.x I'm not getting metaTiling on the google maps demo working correctly. It does work on the latest 1.6.x with the new mercator though.

Hmm... unfortunately I spotted a but with the mercator base coordinates
yesterday and fixed it on trunk only.
Ah, but I see Justin backported it. Good :slight_smile:

Yet, I want to have a look ah how Spearfish and NY Tiger do look, I mean, it's easy to make a low resolution state wide map look good,
the real test is to have some high precision cartography and see
how it matches (I hope the tiger ones are good precision).

Andrea Aime wrote:

Chris Holmes ha scritto:

If we want to have a little hax0r joke we could call it 900913

Hem... sorry? I must miss something here :slight_smile:

Are you some kind of n00b? I guess you're not 1337

Yeah, I must be a noob indeed. In fact, I realized the 900913 meaning
this morning having breakfast, evidently my brain has been spinning
on it while I was sleeping :slight_smile:
Cheers
Andrea

Justin Deoliveira ha scritto:

To compensate for that and for eventual clashes with
the chosen code, I added a new parameter to wms-gs.js,
var EPSG_GOOGLE_CODE = "EPSG:100003"
this will allow people to use their code of choice.

Something worth noting is that 100003 is probably the same code that a user would use when adding their own projection... so if we release and clobber this code it could potentially break them... I am not sure what the behavior will be if there are two identical codes which map to different crs's.

Yeah, using 900913 is certainly better :slight_smile:
Cheers
Andrea

Andrea Aime wrote:

Chris Holmes ha scritto:

Just tried it out and it works great.

I think we should consider doing 1.5.2a, to get this fix in, and to get filters in KML in. Also on my 1.5.x I'm not getting metaTiling on the google maps demo working correctly. It does work on the latest 1.6.x with the new mercator though.

Hmm... unfortunately I spotted a but with the mercator base coordinates
yesterday and fixed it on trunk only.
Ah, but I see Justin backported it. Good :slight_smile:

Yet, I want to have a look ah how Spearfish and NY Tiger do look, I mean, it's easy to make a low resolution state wide map look good,
the real test is to have some high precision cartography and see
how it matches (I hope the tiger ones are good precision).

Oh, I tried it. Spearfish looked pretty good. Tiger seemed pretty off, but I think it also may be off on google earth. I'm trying to get some higher quality data, and I'll try to compare on google earth directly. But either way it's better than the current google maps stuff.

Andrea Aime wrote:

Chris Holmes ha scritto:

If we want to have a little hax0r joke we could call it 900913

Hem... sorry? I must miss something here :slight_smile:

Are you some kind of n00b? I guess you're not 1337

Yeah, I must be a noob indeed. In fact, I realized the 900913 meaning
this morning having breakfast, evidently my brain has been spinning
on it while I was sleeping :slight_smile:

:slight_smile:

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4005,46b44d01255892090977483!