And another appreciation for the GEC moderators who have tried the
script so that it has come to the public after try-outs in different
computers.*
The sheet contains a script. Please do not doubt and and activate it.
You will see a sample data (by Simon and Phil).
Cells that do not have any functionality have been locked. Feel free
to remove the protection; it has no password.
Row 3 is the row that specifes which columns are going into the kml.
If you dont want that tag, keep its Row no.3 empty. The red columns
are necessary for a healthy kml (so it wont make any sense whether you
have it empty or not there).
Row 4 corresponds to the kml tags (Folder, Altitude, Range, Tilt,
Heading, Icon, and Description). You can remove any of them (except
the red ones) and insert any number of new ones which will go into the
description tag. Try it, you will find it easy.
It is strongly recommended to save the kml as a kmz file from GE. This
step will optimize the style tags and decrease the file size.
Any feedback here will be appreciated. Please be careful at first
sight because the script is new and needs more critics.
Enjoy.
---
*: Only one problem may trouble you. It is the "Run-time error '429'"
the solution of which seems beyond my experience. If you have any idea
about it, please thankfully help.
Other than that, a very useful tool.
thanks,
Brendan
The macro is really powerful!
by the way, i realised also that the Lat and Lon are reversed, as
mentioned by Brendan. Will there be any updated version available? if
not, could you pls let me know how i can change the macro in order to
solve this? I tried changing the title at Row 4, but apparently it
didn't work.
Thanks.
Autumn
On Jun 8, 11:56 pm, tekgergedan wrote:
> Thanks for your notice. Was a simple mistake. :)
>
> tek
Upon request, I have uploaded a copy of the whole stuff to another
"temporary" folder which can be reached here:
http://www.samanevi.com/utilities/index.asp
The lat and lon order was corrected.
I strongly recommend people using it to check the versions there since
I can randomly update or evolve it when I have time and enough fun to
create new features.
(Again, that is a temporary link and will be removed today or
yesterday to go back to the original site)
The macro is a "pure" vb code and any row can be a preparation of
something in the following rows. Therefore, changing it should need a
complete understanding of the whole things done there.
Thanks a lot
tek
Thanks for the prompt response. However i can only find v1.01 there
and in this version the Lon and Lat is not yet corrected. Pls advise.
Thanks.
Chow Foon
Now, it should be working in the expected way.
I checked out your xls->kml conversion tool and I was really
impressed... do you know of a way to generate boxes/grids (in GE)
using a similar technique? I have an excel file that contains
bounding coordinates for grids... it is in the format 'XMIN XMAX
YMIN YMAX' as the column headings. Do you know of a way to do what
you did for individual ordered coordinate pairs but transform them
into grid cells?
Thanks in advance for any help you might provide--
-Tiffany
Do you mean 3-D boxes? Or regions (http://code.google.com/apis/kml/
documentation/kml_tags_21.html#region)? What kind of grids? I am not
able to figure it out. Need some examples. Maybe you can create a
sample placemark and post in Open Forum of the bbs to let me see.
But whatever you mean, you need to know scripting. I can do that if I
know what exactly you mean. Hopefully, it will not make the present
script complex.
Waiting...
I suppose what I meant was a ground overlay made up of grid-like lines
(similar to latitude-longitude lines) but with specific locations...
essentially these lines would be superimposed over an area in GE so
that I could see the regions inside each grid-box. (More
specifically, the grid-lines correspond to satellite pixel data that I
have). So there are a few ways I've thought of doing this: (1) I
created a grid layer in a mapping software (ESRI ArcGIS) and turned it
into a kml layer in that software, but the grid it creates has a gray
background, and I wanted it to be transparent) (2) use some sort of
tool like the one you put together where the bounding coordinates for
each gridcell are transformed from an excel file to either points or
(even better) lines that can be displayed in GE. (In excel, my grid
coordinate boundaries look like this:
Id XMIN XMAX
YMIN YMAX
0 -121.25071375800 -121.24238075800 47.90017886160
47.90851186160
1 -121.25071375800 -121.24238075800 47.90851186160
47.91684486160
2 -121.25071375800 -121.24238075800 47.91684486160
47.92517786160
I can post an example of the kml that I created on the bbs Open Forun,
except I don't know how to do that! And unfortunately, I also don't
know scripting. But I'll try an figure out how to post my kml file...
I will call it Cascade_mountain_grid. Thanks for your attempt to
help!!! -Tiff
I have posted my sample kml grid file in the 'files' portion of this
site:
http://groups.google.com/group/kml-support/files?&sort=date (it's
called Cascade_mountain_grid)
Also, see my explantation in the following message. Thanks!
Thanks for you interest. :)
Don't put too much effort into this; I do have an alternate way of
importing grids into GE using ESRI software; I just thought it would
be neat to try it another way... Cheers,
-Tiff
The grid feature does not necessarily need straight horizontal or
straight vertical edges.
tifferooni, I hope it is what you need. Though you can r-click any GE
folder and change its placemarks' styles, using this file might be
cheaper.
I was trying to use the marco but was not able to upload anything to
KML? Are there certain steps that I have to follow inorder for the
marco to work?
> > tek- Hide quoted text -
>
> - Show quoted text -
Just click the button named "Create kml". And drag-and-drop the file
on your harddisk to GE. :)
I tried to play with your excel to kml file but was not able to upload
anything to KML? I am sureI am not doing it right are there certain
steps that I have to do in order for me to upload the file to KML?
I've tried the GE Path to GPS Plots utility on your site, and run into
a quirk. When I paste a path into that box, convert it, and then put
it into Google Earth, it takes the Start point with a negative
longitude (e.g. 35,-110), removes the negative sign and plots it as
35,110, all the way across the world. Thanks.
Leszek Pawlowicz
I see what you mean. Please give me some time. I will reply in its
thread ( http://groups.google.com/group/kml-support-third-party-applications/browse_thread/thread/51d4b968d335d1e5/#
), not here.
Thanks for heads up :)
what the GOverlay and GO.Bound, GO.Noth, GO.South, Go, East, GO.West
and GO.Rotation do in this marco? Is it necessary?
GOverly stands for the Ground Overlay feature of kml, which means an
image overlay over GE.
See: http://code.google.com/apis/kml/documentation/
When you use the colored columns (one of which is for Ground Overlay),
they are placed beneath the placemark defined in the same row.
Only, the Grid is not a kml tag. It creates a grid made of polygons.
I figured my last question out but I have one more.
In this application (macro) I am not sure if I understand the logic
of
the (Grid.downleft Grid.downright Grid.upright Grid.upleft
G.horizontalblend G.verticalblend G.LineWidth
G.LineColor G.FillColor
10,3,0 41,7,0 40,30,0 11,20,0 3 2 2.3
ffffffff 9cffaa00)
what does it mean 10,3,0? are they associated with lat and long?
Could
you please explain?
> > cheaper.- Hide quoted text -
It was the first I thought about. But I should find after which one is
deleted it goes on working. Of course, there is a limit. I will check
them again.
They are the four corners of a rectangle. I should type, for instance,
"SW" instead of "downleft" but user preference to keep the earth's
angle might be different.
10,3,0 stands for Lon 10, Lat 3, Altitude 0.
Within the given box, it creates a grid. Entering 2 and 3 respective
blends creates 6 polygons within the defined rectangle - 3 in
horizontal direction and 2 in vertical direction. :)
Can you add a piece that will enable height dimension of the polygon?
so for example I wanted to see over time the sales of my local shops
the polygon (over time) would ascend and decend with the sales
pattern? I cold liknk sales volume to height value? any thoughts?
thanks
Craig
Nice idea that should have been included. There it is now for use in
the "Po.Height" column.
tek :-)
Thanks, Ive lots of new questions
1. Is there a way of mapping the poylgon to the placemark? by Lat/
Long and in doing so set the placemark height above the height of the
polygon?
2. The polygon is set to 3 sides, can it be more than four side to
creat any shape polygon
3. am i asking to many questions : -).
Ive seen GE Graph but this of course does not offer the flexbility
such as time variable and multi value variables? is this something you
were thinking of developing in your makro?
thanks
Craig H
I was preparing a text with explanations of its use as it is now. I
will try to finish it up this week.
1. A row will always contain the pushpin placemark. If you enter say a
polygon data, the pushpin will also appear above the polygon with its
own descriptions and other features in the MyPlaces folder. Though I
am attempting to include all the kml features, a height value is among
the ones that I did not think of for a short term. It is easy to
include it. I'll do.
2. I did not understand the question. There is no limit to the sides.
But the spreadsheet cannot create polygon coordinates. A polygon or
path should first be drawn in GE or with any other tool and, then, the
coorditanes should be copied from the NotePad.
3. No...
Yes, I am developing it. Currently, before going on too far, I am
thinking of doing something on the net which can be shared (including
other features in mind). But I have a limited time. Therefore, I have
to refrain any local test attempts before deciding on everything both
problematic and potential. It will be alright to share what it is
going to be when the time has come. I will need your views and critics
then. But for the time being, I am not clear how to achieve that in a
most effective way.
Your ideas are valuable. Thanks for them. :-)
thanks for the quick response and the answers, im always happy to
share my views, test an critique. In my first question Im happy to
draw the polgon ,it was the auto placement of the polygon depending on
the placemark lat/ long I was trying to achieve, sorry if Im just
misunderstanding the point my self maybe i need I better version GE to
us the polgon placements..
regards
Craig H
BTW, there is a problem. To have people use the script who have
already done collections, I am aware of need to a reverse way; ie a
kml2xls script. That may hopefully ease the work to insert the polygon
and path coordinates as well.
Best
tek
Great help guide I see attached on the site. Do you have a source of
hexdecimal colours or a simple calc from RGb to hexidecimal that you
show, e.g in your guide: "The color of the polygon in "aabbggrr"
format expressed in hexadecimal notation. "aa" stands for alpha
(transparency). Empty values (or the empty row#3) is interpreted as
white. " If you do that would be great.
Also Ive been using the spreadsheet the last couple of weeks is there
a way to generate a polygon based on number of side that will reside
in the same place as the placemark? this will save time on generating
a polygon in GE and then copying out the coords...If not I have to
create a polygon for each data point manually (if I have 300 this
takes a long time) maybe something simple such as just basic shapes
from 1 to 50 side (50 side equating to a circle)?
Let me know what you think if there are any ways to enhance this..
regards
Craig H
There are a few pages of color lists/conversions the links of which I
did not saved. But, for me, the best to have is rsgrillo's tool here :
http://www.sgrillo.net/googleearth/index.htm
As to your second paragraph, I had done something where dynamically
one can enter values and the values are converted to statistical bars.
So, I understand what you have as a problem. A hard one. :| But I am
not sure what you technically mean. Do you mean it create the polygon
taking the placemark's coordinates as a base/center? Then (1) a value
of distance between one edge and the placemark and (2) a value of the
number of edges will be needed. Is that what you mean?
Best
tek
regards
Craig H
Best
tek
thanks
Craig hazledine
BTW, when a polygon is used as a statistical bar, would it be useful
for you to colorize the one with the highest value with a specific
color? If it'd I will spend some more effort since this is something
important, I think. If not, I may do it some time later.
:)
tek
Craig H
How is all going?
regards
Craig Hazledine
> > tek- Hide quoted text -