Thousands of polygons...

835 views
Skip to first unread message

Silverio Lora

unread,
Feb 19, 2011, 10:54:59 PM2/19/11
to google-map...@googlegroups.com

Hello friends,

 

I’m using the Google Maps API for showing information about the 32 states and 2,456 municipalities of my country.

Each polygon has between 500 and 2,000 nodes and I have serious performance problems.

I tried simplifying some polygons removing nodes without a real improvement.

I tried creating GroundOverlay for the 32 states but I’ll expend a lot of time for 2,456 images.

 

Some suggestion??

 

Martin™

unread,
Feb 20, 2011, 4:59:10 AM2/20/11
to Google Maps JavaScript API v3
How about Fusion tables?

http://code.google.com/apis/maps/documentation/javascript/overlays.html#FusionTables

Let Google create a custom tile layer for your map.

Martin.

Nick

unread,
Feb 20, 2011, 6:42:59 AM2/20/11
to Google Maps JavaScript API v3
I've tried this with the UK, the file size for all that geodata was
25MB+, mainly because of Scotland's complex coastline and the fact
that some counties had incredibly complex <MultiGeometry> to take
account of hundred and hundreds of offshore islands.

The performance on Fusion Tables was OK if I included just the name
and geometry for each polygon. Adding any other data (ie. useful for
turning the map into a chloropleth) slowed down the map's reaction
times.

Based on my experience I disagree that Fusion Tables is a solution for
you at present.

I assume there's a way to simplify polygons while ensuring the
boundaries are still coterminous (ie. using some kind of GiS to crunch
the numbers). Presumably then simpler polygons would equal better
Fusion Tables performance.

If anyone can enlightenment me on whether I'm right in my assumption,
do tell...

Good luck Silverio,

Nick

On Feb 20, 3:54 am, "Silverio Lora" <silv...@gmail.com> wrote:

Michael Geary

unread,
Feb 20, 2011, 2:09:38 PM2/20/11
to google-map...@googlegroups.com
You can do polygon simplification interactively here:


or by installing and using this open source software:


The first one definitely keeps the boundaries coterminous; I think the second one does too based on its description, but I haven't tested it.

-Mike

Silverio Lora

unread,
Feb 20, 2011, 12:55:13 PM2/20/11
to google-map...@googlegroups.com
Thank you friends,
Some details:
The project is very complex, the maps are only a part of it, we have a MySQL
database with 35 tables.
A "User" has "Access" and each "Access" has "Layers", each "Layer" has
"Contents" and each "Contents" can be composed of polygons, markers and
polylines.
That's why I can't use fusion tables, because will be complicate manage
information in two databases.
Is there an equivalent to MarkerManager but showing part of the polygon
nodes depending of map zoom level?
Greetings and thanks for the help,
Silverio

-----Mensaje original-----
De: google-map...@googlegroups.com
[mailto:google-map...@googlegroups.com] En nombre de Nick
Enviado el: domingo, 20 de febrero de 2011 05:43 a.m.
Para: Google Maps JavaScript API v3
Asunto: [Google Maps API v3] Re: Thousands of polygons...

Good luck Silverio,

Nick

--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to
google-maps-js-a...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.872 / Base de datos de virus: 271.1.1/3454 - Fecha de la
versión: 02/19/11 13:33:00

Silverio Lora

unread,
Feb 20, 2011, 9:09:24 PM2/20/11
to google-map...@googlegroups.com

Thanks Mike, we are considering the second one, but before we need to mígrate to Postgres.

Somebody has experiences using Postgres and GIS extensión??

Regards!!!!!

--

You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es

Versión: 9.0.872 / Base de datos de virus: 271.1.1/3454 - Fecha de la versión: 02/20/11 01:35:00

DeaneVenske

unread,
Apr 20, 2011, 5:51:52 PM4/20/11
to Google Maps JavaScript API v3
Hi Silverio,

We had the same problem with highly complex polygons (and lots of
them) with the need for interactivity of these polygons. We ended up
using the google maps flash API. The issue is not performance of
backends/the api. It boils down to graphics. Flash has hardware
acceleration and it uses vectors to describe the polygons, it's
infinitely better at handling complex graphics, because that's what
you're rendering.

I can't wait for google maps to support some hardware acceleration and
for me to be able to move out of flash, it's certainly not ideal but
it works really well for now.

Thanks,
Deane

On Feb 20, 8:09 pm, "Silverio Lora" <silv...@gmail.com> wrote:
> Thanks Mike, we are considering the second one, but before we need to
> mígrate to Postgres.
>
> Somebody has experiences using Postgres and GIS extensión??
>
> Regards!!!!!
>
> De: google-map...@googlegroups.com
> [mailto:google-map...@googlegroups.com] En nombre de Michael Geary
> Enviado el: domingo, 20 de febrero de 2011 01:10 p.m.
> Para: google-map...@googlegroups.com
> Asunto: Re: [Google Maps API v3] Re: Thousands of polygons...
>
> You can do polygon simplification interactively here:
>
> http://mapshaper.org/
>
> or by installing and using this open source software:
>
> http://www.cartoweb.org/downloads/vertexsimplification/documentation....
>
> The first one definitely keeps the boundaries coterminous; I think the
> second one does too based on its description, but I haven't tested it.
>
> -Mike
>
> On Sun, Feb 20, 2011 at 3:42 AM, Nick <mercy.recomme...@gmail.com> wrote:
>
> I assume there's a way to simplify polygons while ensuring the
> boundaries are still coterminous (ie. using some kind of GiS to crunch
> the numbers). Presumably then simpler polygons would equal better
> Fusion Tables performance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to google-map...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-js-a...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

Ben Appleton

unread,
Apr 20, 2011, 6:31:06 PM4/20/11
to google-map...@googlegroups.com

Hi Deane,

Last week we released an optimization to polyline/polygon rendering. You should now be able to render thousands of polys totaling hundreds of thousands of vertices. I'm curious if this is enough for you to move off of Flash?

Thanks
Ben

Reply all
Reply to author
Forward
0 new messages