[Geoserver-users] Testing overlap WMS to Google Maps

Hi, I trying overlap one layer of WMS from my Geoserver with the maps
of Google Maps...The performace of rendering maps for google is very
fast, but when google api start to send request to Geoserver, the
performance is poor...Datastore of my layers is PostGis, google api
start to make many connections to geoserver, and collapse the server.
One question...when geoserver receive one map request, before to
access data, checks the bounds of the layer???. My layer is very
simple (=30 points), I don't understand why google api spent so much
time to render...

Thanks in advanced:
Fernando Zuriaga

Hi Fernando,

I am also working with Google Maps so maybe I can help you a bit.
In my case Geoserver-Google Maps is working fine, I have my layer in a postgis database too and there is nearly 1million features on it.
In any case I had to set up a caching service because still Geoserver can not be as fast as Google tiles.

I had problems with newest version of Geoserver, not stable, because it was opening one connection to PostgreSQL per request, an because with google maps you do a lot of request the server was out of available connections. With the satble version pooling of PostgreSQL connections works for me.

There are some issues when using SLD but considering that you only have 30 points that should not be a problem no?

Hope this helps.

Javier.

On 26/05/2006, at 9:04, Fernando Zuriaga wrote:

Hi, I trying overlap one layer of WMS from my Geoserver with the maps
of Google Maps...The performace of rendering maps for google is very
fast, but when google api start to send request to Geoserver, the
performance is poor...Datastore of my layers is PostGis, google api
start to make many connections to geoserver, and collapse the server.
One question...when geoserver receive one map request, before to
access data, checks the bounds of the layer???. My layer is very
simple (=30 points), I don't understand why google api spent so much
time to render...

Thanks in advanced:
Fernando Zuriaga

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

JTorre.vcf (278 Bytes)

Hi Javier,

I use the Geoserver versión 1.3.0-RC6, PostgreSQL 7.4, as I see every
request open a new connection to the database. Which version I have to
install to avoid this?.
When I make a request from web explorer, the maps render very fast, but when
google api start to make requests....it's slow.

I have another problem: my maps are 100m displaced to the north-east of the
correct position (with reference of google maps). My layers are all in
EPSG:23030...is this normal behavior???.I use the script wms-gs.js that find
in the geoserver web page.

Thanks...
F.Zuriaga

-----Mensaje original-----
De: Javier de la Torre [mailto:jatorre@anonymised.com]
Enviado el: viernes, 26 de mayo de 2006 9:23
Para: Fernando Zuriaga
CC: geoserver-users@lists.sourceforge.net
Asunto: Re: [Geoserver-users] Testing overlap WMS to Google Maps

Hi Fernando,

I am also working with Google Maps so maybe I can help you a bit.
In my case Geoserver-Google Maps is working fine, I have my layer in a
postgis database too and there is nearly 1million features on it.
In any case I had to set up a caching service because still Geoserver can
not be as fast as Google tiles.

I had problems with newest version of Geoserver, not stable, because it was
opening one connection to PostgreSQL per request, an because with google
maps you do a lot of request the server was out of available connections.
With the satble version pooling of PostgreSQL connections works for me.

There are some issues when using SLD but considering that you only have 30
points that should not be a problem no?

Hope this helps.

Javier.

On 26/05/2006, at 9:04, Fernando Zuriaga wrote:

Hi, I trying overlap one layer of WMS from my Geoserver with the maps
of Google Maps...The performace of rendering maps for google is very
fast, but when google api start to send request to Geoserver, the
performance is poor...Datastore of my layers is PostGis, google api
start to make many connections to geoserver, and collapse the server.
One question...when geoserver receive one map request, before to
access data, checks the bounds of the layer???. My layer is very
simple (=30 points), I don't understand why google api spent so much
time to render...

Thanks in advanced:
Fernando Zuriaga

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and
Risk!
Fully trained technicians. The highest number of Red Hat
certifications in the hosting industry. Fanatical Support. Click to
learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Fernando,

About the problem of Geoserver opening too many PostgreSQL connections
others can probably help you better. In my case I am running the
official stable version 1.3.0. By the way, if you click on the big
Download button in the geoserver main page you get to the Latest page,
shouldn't this point to Stable? I installed first 1.3.1 because I did
not realize on this...

Regarding the projection issues on Google Maps the first thing you
have to know is that Google Maps uses a different projection for every
different zoom level. As a good "aproximation" you can use EPSG:4326
until zoom level 6 and from 5 to 0 (0 is the lowest zoom level) you
can use EPSG:41001.
These two projections are installed by default in Geoserver.
The wms-gs.js should change the projection on the fly for this (I am
looking at the file now). Take a look at the code, is very simple.
If for some reason this is not happening to you check the urls that
the script is generating to see if they are correct.
Maybe you will have to adapt the tileCountry.myMercZoomLevel=5; to a
bigger value...

It would be great to have a perfect mapping of Google maps projections
at different zoom levels with EPSGs in Geoserver so that they overlay
perfectly (but I don't know if Google also change the projection
depending on the latitude/longitude where you are...)

Javier.

On 5/26/06, Fernando Zuriaga <fzuriaga@anonymised.com> wrote:

Hi Javier,

I use the Geoserver versión 1.3.0-RC6, PostgreSQL 7.4, as I see every
request open a new connection to the database. Which version I have to
install to avoid this?.
When I make a request from web explorer, the maps render very fast, but when
google api start to make requests....it's slow.

I have another problem: my maps are 100m displaced to the north-east of the
correct position (with reference of google maps). My layers are all in
EPSG:23030...is this normal behavior???.I use the script wms-gs.js that find
in the geoserver web page.

Thanks...
F.Zuriaga

-----Mensaje original-----
De: Javier de la Torre [mailto:jatorre@anonymised.com]
Enviado el: viernes, 26 de mayo de 2006 9:23
Para: Fernando Zuriaga
CC: geoserver-users@lists.sourceforge.net
Asunto: Re: [Geoserver-users] Testing overlap WMS to Google Maps

Hi Fernando,

I am also working with Google Maps so maybe I can help you a bit.
In my case Geoserver-Google Maps is working fine, I have my layer in a
postgis database too and there is nearly 1million features on it.
In any case I had to set up a caching service because still Geoserver can
not be as fast as Google tiles.

I had problems with newest version of Geoserver, not stable, because it was
opening one connection to PostgreSQL per request, an because with google
maps you do a lot of request the server was out of available connections.
With the satble version pooling of PostgreSQL connections works for me.

There are some issues when using SLD but considering that you only have 30
points that should not be a problem no?

Hope this helps.

Javier.

On 26/05/2006, at 9:04, Fernando Zuriaga wrote:

> Hi, I trying overlap one layer of WMS from my Geoserver with the maps
> of Google Maps...The performace of rendering maps for google is very
> fast, but when google api start to send request to Geoserver, the
> performance is poor...Datastore of my layers is PostGis, google api
> start to make many connections to geoserver, and collapse the server.
> One question...when geoserver receive one map request, before to
> access data, checks the bounds of the layer???. My layer is very
> simple (=30 points), I don't understand why google api spent so much
> time to render...
>
> Thanks in advanced:
> Fernando Zuriaga
>
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost and
> Risk!
> Fully trained technicians. The highest number of Red Hat
> certifications in the hosting industry. Fanatical Support. Click to
> learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

I started a Google Maps GeoServer page:

http://docs.codehaus.org/display/GEOSDOC/Google+Maps

Please add to it, with samples of what you've done, tips and tricks, and links to working versions.

Javier, could you attach your caching script there? Others may find it useful.

And I'm still worried about your postgis bug, as I spent like half a day trying to figure out where the code might leave a connection open and just couldn't figure it out :frowning:

Chris

Javier de la Torre wrote:

Hi Fernando,

I am also working with Google Maps so maybe I can help you a bit.
In my case Geoserver-Google Maps is working fine, I have my layer in a postgis database too and there is nearly 1million features on it.
In any case I had to set up a caching service because still Geoserver can not be as fast as Google tiles.

I had problems with newest version of Geoserver, not stable, because it was opening one connection to PostgreSQL per request, an because with google maps you do a lot of request the server was out of available connections. With the satble version pooling of PostgreSQL connections works for me.

There are some issues when using SLD but considering that you only have 30 points that should not be a problem no?

Hope this helps.

Javier.

On 26/05/2006, at 9:04, Fernando Zuriaga wrote:

Hi, I trying overlap one layer of WMS from my Geoserver with the maps
of Google Maps...The performace of rendering maps for google is very
fast, but when google api start to send request to Geoserver, the
performance is poor...Datastore of my layers is PostGis, google api
start to make many connections to geoserver, and collapse the server.
One question...when geoserver receive one map request, before to
access data, checks the bounds of the layer???. My layer is very
simple (=30 points), I don't understand why google api spent so much
time to render...

Thanks in advanced:
Fernando Zuriaga

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------

begin:vcard
fn:Javier de la Torre
n:de la Torre;Javier
org:Museo Nacional de Ciencias Naturales (CSIC)
adr:;;C/Jose Gutierrez Abascal, 2;Madrid;Madrid;28006;Spain
email;internet:jatorre@anonymised.com
title:Scientist
url:http://www.biogeografia.com/edit/
version:2.1
end:vcard

------------------------------------------------------------------------

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

Javier de la Torre wrote:

Hi Fernando,

About the problem of Geoserver opening too many PostgreSQL connections
others can probably help you better. In my case I am running the
official stable version 1.3.0. By the way, if you click on the big
Download button in the geoserver main page you get to the Latest page,
shouldn't this point to Stable? I installed first 1.3.1 because I did
not realize on this...

No, Latest is the latest release, including beta's. Stable is the latest stable release.

Apologies if we're a bit willy with the download now button. We'll never put an alpha there, but solid betas and RC's go there, as we want people testing the latest releases, to give us feedback. If you have to go stable, then download from the stable link. It's very helpful that you found the postgres error (though I wish I could do something about it and/or reproduce the error, since it closes fine on our installs).

It would be great to have a perfect mapping of Google maps projections
at different zoom levels with EPSGs in Geoserver so that they overlay
perfectly (but I don't know if Google also change the projection
depending on the latitude/longitude where you are...)

I think few people in Google even know, at least not the ones I talked to. I can try to get them to find it out, I'd love a script that matches everything up exactly.

Chris

Javier.

On 5/26/06, Fernando Zuriaga <fzuriaga@anonymised.com> wrote:

Hi Javier,

I use the Geoserver versión 1.3.0-RC6, PostgreSQL 7.4, as I see every
request open a new connection to the database. Which version I have to
install to avoid this?.
When I make a request from web explorer, the maps render very fast, but when
google api start to make requests....it's slow.

I have another problem: my maps are 100m displaced to the north-east of the
correct position (with reference of google maps). My layers are all in
EPSG:23030...is this normal behavior???.I use the script wms-gs.js that find
in the geoserver web page.

Thanks...
F.Zuriaga

-----Mensaje original-----
De: Javier de la Torre [mailto:jatorre@anonymised.com]
Enviado el: viernes, 26 de mayo de 2006 9:23
Para: Fernando Zuriaga
CC: geoserver-users@lists.sourceforge.net
Asunto: Re: [Geoserver-users] Testing overlap WMS to Google Maps

Hi Fernando,

I am also working with Google Maps so maybe I can help you a bit.
In my case Geoserver-Google Maps is working fine, I have my layer in a
postgis database too and there is nearly 1million features on it.
In any case I had to set up a caching service because still Geoserver can
not be as fast as Google tiles.

I had problems with newest version of Geoserver, not stable, because it was
opening one connection to PostgreSQL per request, an because with google
maps you do a lot of request the server was out of available connections.
With the satble version pooling of PostgreSQL connections works for me.

There are some issues when using SLD but considering that you only have 30
points that should not be a problem no?

Hope this helps.

Javier.

On 26/05/2006, at 9:04, Fernando Zuriaga wrote:

> Hi, I trying overlap one layer of WMS from my Geoserver with the maps
> of Google Maps...The performace of rendering maps for google is very
> fast, but when google api start to send request to Geoserver, the
> performance is poor...Datastore of my layers is PostGis, google api
> start to make many connections to geoserver, and collapse the server.
> One question...when geoserver receive one map request, before to
> access data, checks the bounds of the layer???. My layer is very
> simple (=30 points), I don't understand why google api spent so much
> time to render...
>
> Thanks in advanced:
> Fernando Zuriaga
>
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost and
> Risk!
> Fully trained technicians. The highest number of Red Hat
> certifications in the hosting industry. Fanatical Support. Click to
> learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

Hi Chris,

Apologies if we're a bit willy with the download now button. We'll never put an alpha there, but solid betas and RC's go there, as we want people testing the latest releases, to give us feedback. If you have to go stable, then download from the stable link. It's very helpful that you found the postgres error (though I wish I could do something about it and/or reproduce the error, since it closes fine on our installs).

I understand. Fairly enough :slight_smile: I wrote you a private message regarding this issue and offering my help over chat... I can also give you access to the server where I tried and where the issue happened, maybe that can help you.

It would be great to have a perfect mapping of Google maps projections
at different zoom levels with EPSGs in Geoserver so that they overlay
perfectly (but I don't know if Google also change the projection
depending on the latitude/longitude where you are...)

I think few people in Google even know, at least not the ones I talked to. I can try to get them to find it out, I'd love a script that matches everything up exactly.

I found a very interesting post at (http://cfis.savagexi.com/articles/2006/05/03/google-maps-deconstructed) explaining how Google Maps tiling works and how they do with projections. The most curious, and I believe also clever, is that they actually create new projections on every zoom level using pixels as the unit system... this is really good for presentation in computer screens and save them from a lot of headaches (different pixels are differently represented in different screens), but probably this is not that usual in the geography world. Maybe this is the way future maps will work :?

Other interesting thing that we could specify is the matching of Google Maps zoom to the OGC scales idea... I spent half an hour trying to find the Min-MaxScaleDenominator that would allow me to change the presented layer from google maps Zoom 6 to 7, but I would like to change more often, I am discovering how important is to represent different things at different scales!

Just add in-database SLD filter processing to Geoserver and you have a perfect match to represent big datasets on Google Maps. Is incredible how many hacks are appearing in the Google Maps user community to deal with things that trough OGC standards would be much easier... (or maybe not...)

Javier.

Javier de la Torre wrote:

Hi Chris,

Apologies if we're a bit willy with the download now button. We'll never put an alpha there, but solid betas and RC's go there, as we want people testing the latest releases, to give us feedback. If you have to go stable, then download from the stable link. It's very helpful that you found the postgres error (though I wish I could do something about it and/or reproduce the error, since it closes fine on our installs).

I understand. Fairly enough :slight_smile: I wrote you a private message regarding this issue and offering my help over chat... I can also give you access to the server where I tried and where the issue happened, maybe that can help you.

Cool, let's do it on monday or tuesday.

It would be great to have a perfect mapping of Google maps projections
at different zoom levels with EPSGs in Geoserver so that they overlay
perfectly (but I don't know if Google also change the projection
depending on the latitude/longitude where you are...)

I think few people in Google even know, at least not the ones I talked to. I can try to get them to find it out, I'd love a script that matches everything up exactly.

I found a very interesting post at (http://cfis.savagexi.com/articles/ 2006/05/03/google-maps-deconstructed) explaining how Google Maps tiling works and how they do with projections. The most curious, and I believe also clever, is that they actually create new projections on every zoom level using pixels as the unit system... this is really good for presentation in computer screens and save them from a lot of headaches (different pixels are differently represented in different screens), but probably this is not that usual in the geography world. Maybe this is the way future maps will work :?

Very interesting. Brent recently made a kml_reflector, which is quite nice, see: http://docs.codehaus.org/display/GEOSDOC/Google+Earth#GoogleEarth-KMLReflector (the code is not released yet, will be soon, if you want a beta we can get one for you).

We could do a similar GMaps reflector, but that does the right switches on the projections for you. If anyone figures out more than the 41001 -> 4326 switch that'd be great, do let us know.

Other interesting thing that we could specify is the matching of Google Maps zoom to the OGC scales idea... I spent half an hour trying to find the Min-MaxScaleDenominator that would allow me to change the presented layer from google maps Zoom 6 to 7, but I would like to change more often, I am discovering how important is to represent different things at different scales!

Do let us know what scales you come up with. Matching with google maps scales would be great. I know that their zoom is based on power of two, but I don't know how that translates in to ogc min/max scale stuff.

We're also going to be working on an online SLD editor, and I think one of the keys is that it will be based on scale. You'll write a new rule for each zoom level, as that's how web map works. In the future we could try to adapt udig's sld editor. Theirs is geared towards desktop, where you can zoom in and control everything right there. With web mapping it's much better to have the pre-set zoom levels, where things look good. If you look at http://sigma.openplans.org you'll see how we present things differently based on the zoom.

Just add in-database SLD filter processing to Geoserver and you have a perfect match to represent big datasets on Google Maps. Is incredible how many hacks are appearing in the Google Maps user community to deal with things that trough OGC standards would be much easier... (or maybe not...)

Yeah, I'm hoping GeoServer can be a tool to make it much easier to serve maps. And indeed not just on gmaps, but also google earth, and even yahoo maps and microsoft ve, ect. So that people will be able to just set up GeoServer and view it in lots of different ways. But to do it right we need to make it easier to do on just _one_ of the ways.

Chris

Javier.

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