data compression tools for kml file

2,182 views
Skip to first unread message

stonehopper

unread,
Apr 1, 2008, 9:08:36 AM4/1/08
to KML Developer Support - Getting Started with KML, sean....@gmail.com
Hi everyone,

Just doing some testing of a shapefile file that I converted to a kml
file to load into google earth. The problem I am having is the amount
of time it takes to load onto Google earth

I think it is to do with the amount of points in the file

The area I am doing the testing on is County Donegal on the North Left
corner of the Republic of Ireland.

I was just wondering if anybody had any tools or suggestions. Where I
could reduce the file size and decrease the load time, but I need to
keep the accuracy

Any help would be great look forward to your comments

Thanks Sean

barryhunter [KML Guru]

unread,
Apr 1, 2008, 11:04:51 AM4/1/08
to KML Developer Support - Getting Started with KML
The main thing to try is to compress the file as a KMZ. (GE can do
this, or a KMZ is just a KML file saved inside a ZIP file with a .kmz
extension)
That might not really help loading time, other than there is less data
to transfer in the initial transfer.

Don't know of any tools, to simplefy files. But some GIS packages I
think can reduce the complexity of lines (removing intermediate
points) but which perserve the appearence of the lines.

You might like to look at the regionator python libary/tool which I
think might be able to take your file and break it into bits, which
should help with loading time, (and maybe that has a point-reduction
alogoirthm builtin?)

mwill

unread,
Apr 2, 2008, 12:33:00 AM4/2/08
to KML Developer Support - Getting Started with KML

Sean,
As barry alluded to, using a KMZ or some other compression would
only speed up the transmission of the file over the network. Are you
loading the file locally or over a network (internet)? That's an
important distinction.

mwill

stonehopper

unread,
Apr 2, 2008, 12:19:18 PM4/2/08
to KML Developer Support - Getting Started with KML
Yes i am trying to show health information over the internet
Some of the files are so taking ages to load


was wondering if anybody knew of an editing tool for the google maps
so i
could reduce the some of the points and also align the polygons
in the kml file.

I do have some alignment issues

Any help would be great

Thanks Sean

finnadat

unread,
Apr 2, 2008, 1:21:18 PM4/2/08
to KML Developer Support - Getting Started with KML
I actually have a similar problem that should resolve both of our
issues. If you look at http://maps.google.com/maps?q=http://bbs.keyhole.com/ubb/download.php?Number=1143168&t=k&om=1
- each "block"/polygon of this grid renders separately and the
performance is dog slow. My thinking is that when converted from a
shp file in map window there is an immense amount of data not needed
being exported out to the KML file, thus compromising performance.

I was thinking that the best way to tackle the situation would be to
have a grid instead of individual blocks/polygons (thinking that lines
would be easier to render than polygons). The hack i thought of would
be to make a grid in illustrator and somehow get back into map window
and then export to kml format, but possibly a GIS package that reduces
the complexity of lines by removing intermediate points as suggested
by barryhunter would be a less cheezy way of achieving this goal.

so if there are any thoughts or suggestions i would be greatly
appreciated.

thanks

On Apr 2, 11:19 am, stonehopper wrote:
> Yes i am trying to show health information over the internet
> Some of the files are so taking ages to load
>
> was wondering if anybody knew of an editing tool for the google maps
> so i
> couldreducethe some of the points and also align the polygons
> in the kml file.
>
> I do have some alignment issues
>
> Any help would be great
>
> Thanks Sean
>
> On Apr 2, 5:33 am, mwill wrote:
>
> > Sean,
> > As barry alluded to, using a KMZ or some othercompressionwould
> > only speed up the transmission of the file over the network. Are you
> > loading the file locally or over a network (internet)? That's an
> > important distinction.
>
> > mwill
>
> > On Apr 1, 9:08 am, stonehopper wrote:
>
> > > Hi everyone,
>
> > > Just doing some testing of a shapefile file that I converted to a kml
> > > file to load into google earth. The problem I am having is the amount
> > > of time it takes to load onto Google earth
>
> > > I think it is to do with the amount of points in the file
>
> > > The area I am doing the testing on is County Donegal on the North Left
> > > corner of the Republic of Ireland.
>
> > > I was just wondering if anybody had any tools or suggestions. Where I
> > > couldreducethe file size and decrease the load time, but I need to

ManoM

unread,
Apr 2, 2008, 1:39:21 PM4/2/08
to KML Developer Support - Getting Started with KML
How if the data being produced? If you are creating them using Google
Earth, you may be surprised at how many styles it creates.
Rationalizing the style elements can really improve things a lot.

On Apr 2, 10:21 am, finnadat wrote:
> I actually have a similar problem that should resolve both of our
> issues. If you look athttp://maps.google.com/maps?q=http://bbs.keyhole.com/ubb/download.php...

finnadat

unread,
Apr 2, 2008, 6:31:01 PM4/2/08
to KML Developer Support - Getting Started with KML
the data is from arcgis/shape files (the standard in my industry) and
that is really the only way I can get the referential spacial data I
need. I have tried going thru map window and directly into Google
Earth.

When saved out from a 3.8mb shp file from map window the KML ends up
being 15mb and when imported directly into Google Earth the KML
inflates to 20mb. The KMZ is more manageable at 1.3mb - so I can
almost get there to the 1mb limit on kmz files in Google earth -
http://bbs.keyhole.com/ubb/showthreaded.php?Cat=&Number=1143733&page=0&vc=1#Post1143733
- but if I can take out the data I don't need, I should be able to get
under that limit and the files that aren't as large should run better.

at the end of the day i'm looking for a way to strip out data that i
don't care about and simplify lines - any thoughts?

stonehopper

unread,
Apr 2, 2008, 8:12:02 PM4/2/08
to KML Developer Support - Getting Started with KML
Guys is there like a kml editor tool, where i could overaly the kml,
then edit and aline better in google maps and google earth
delete alot of the unneeded lat/longs and this would reduce the file
sizes ?

i am able to edit the orihinnal .shp in arcgis/ arcview. but the
overlay on google maps and google earth is way out

any help would be great

On Apr 2, 11:31 pm, finnadat wrote:
> the data is from arcgis/shape files (the standard in my industry) and
> that is really the only way I can get the referential spacial data I
> need. I have tried going thru map window and directly into Google
> Earth.
>
> When saved out from a 3.8mb shp file from map window the KML ends up
> being 15mb and when imported directly into Google Earth the KML
> inflates to 20mb. The KMZ is more manageable at 1.3mb - so I can
> almost get there to the 1mb limit on kmz files in Google earth -http://bbs.keyhole.com/ubb/showthreaded.php?Cat=&Number=1143733&page=...

mwill

unread,
Apr 2, 2008, 9:21:37 PM4/2/08
to KML Developer Support - Getting Started with KML

stonehopper,

As far as editing the shape displayed by KML, you can do that in GE.
When you are viewing the Properties of the polygon, you can delete
points. Hover your mouse over the point you want to delete and right
click it. You can also move that point by left clicking and dragging
the point to its new location. However, this method could be very
tedious if you have lots of points.

Is that what you are looking for or something more automatic?

mwill

ManoM

unread,
Apr 3, 2008, 1:48:23 AM4/3/08
to KML Developer Support - Getting Started with KML
Google Earth is the best KML editing tool.

This video, part of the geo developer series, explains the basics:
http://www.youtube.com/watch?v=WeHnQESDr-8

Mano

marquies

unread,
Apr 11, 2008, 1:56:40 AM4/11/08
to KML Developer Support - Getting Started with KML
Maybe the Google Sketchup could help you.
Reply all
Reply to author
Forward
0 new messages