How do I create a Grid?

2,184 views
Skip to first unread message

LandisB

unread,
Nov 10, 2006, 3:32:11 PM11/10/06
to KML Discussions
I'm trying to figure out a way to create a grid for use in Search and Rescue. The grid is based on latitude and longitude, so all I really need to do is draw lines and put some labels in there. Any links to resources that might help me figure out how to do this?

Thanks!

tekgergedan

unread,
Nov 10, 2006, 3:41:24 PM11/10/06
to KML Discussions

Valery35

unread,
Nov 10, 2006, 5:04:11 PM11/10/06
to KML Discussions
1. You can set UTM grid in GE options.
2. Maybe you need tile this maps?
http://bbs.keyhole.com/ubb/showflat.php/Cat/0/Number/651515/an/0/page/3#651515
3. Maybe this for you interest also?
http://bbs.keyhole.com/ubb/showflat.php?Number=467932
4. And this?
http://www.fox-fam.com/wordpress/?p=34

Welcome to GEC !

LandisB

unread,
Nov 11, 2006, 4:39:04 PM11/11/06
to KML Discussions
That looks really good, but I need to know how to make my own. I'm not looking for UTM.

My grid is 7.5' quads with numbers based on the US Aeronautical Sectionals. Each quad is broken down into 4 quadrants lettered A/B/C/D and each lettered quadrant is broken down into another 4 letters (AA/AB/AC/etc).

I would like to make a layer that shows different things at different zoom levels.

• Further out it should show outlines of each sectional with the sectional abbreviation on it (eg Los Angeles is LAX and is bounded by 36N/32N and 121.5W/115W).

• Zooming in it should show the individual 7.5' quads with numbers (LAX112)

• Finally zooming in more would show LAX112A etc.

Is this possible with GE? If so, how would I go about making it. Any tutorials out there for this kind of thing?

LandisB

unread,
Nov 11, 2006, 4:41:45 PM11/11/06
to KML Discussions
Those are really neat.

#2 seems to be a Windows application so that leaves me out.
#3 is VERY interesting, though brings my computer to a crawl (MacPro 2.6GHz/2GB RAM)
#4 is perfect, and very useful for my purposes, but I still need to be able to put my SAR grid on top of it.

JKurtock

unread,
Nov 11, 2006, 7:56:47 PM11/11/06
to KML Discussions
LandisB

Your problem is either quite easy, or a little difficult. The tools suggested by Valery35 and Tekgergedan are immensely powerful, and probably much more than you need.

If all you want is a grid on lat/lon, then you just prepare a KML file with <LineString>s. http://earth.google.com/kml/kml_tags_21.html#linestring You don't even have to do UTM conversions as GE works in decimal degrees already. You can add placemarks for labeling (easy), or use screen overlays (harder).

If you want the level of detail to change as you zoom in and out, then it gets more fun, and you'll need to study <Region>s. http://earth.google.com/kml/kml_21tutorial.html#workingregions These are designed for just that sort of thing (though, at each level the drawing is still quite easy, using <LineString>s.)

Good luck!

- Jeff

LandisB

unread,
Nov 12, 2006, 12:03:03 AM11/12/06
to KML Discussions
Rock ON. Thank you for pointing this out. I'm a little overwhelmed by how much stuff you can do with GE so this pointer was just what I needed.

I'm sure there's a better way to do this so I'm definitely open to suggestions. But here's the first take at what I'm trying to accomplish.

Ideally I'd like for the grid names to fall on two lines:

SFO
123

instead of:

SFO 123

I'd also like them to turn off when they start cluttering. And I suppose hoping to type that number into a search box and have it zoom to the proper grid is asking a little too much?

I'll have to look into the regions thing that you mentioned in order to make the grid (and I guess labels) turn off and on as you zoom in and out.

Any other suggestions anyone might have that could help me? I've got to do at least four of these to cover California and they're a real pain in the rear - I've done this completely through data massaging in Excel and BBEdit - I wonder if there's a better way.

After I finish California, perhaps I'll do the rest of the country. And then, of course, there's the new 'cell' grid system that will have different names for each grid. I'll implement that later.

BTW, this is the search grid for the Civil Air Patrol - http://www.cap.gov

Thanks again for the help!

-Landis
680936-CAPGridBeta.kml

Valery35

unread,
Nov 12, 2006, 5:39:05 AM11/12/06
to KML Discussions
#3 is VERY interesting, though brings my computer to a crawl (MacPro 2.6GHz/2GB RAM)

Thanks For you not need open ALL in one time. It is very large dataset. Need open network links by steps. All datasets group by first letters of ICAO codes (countries). I make this for GE 3.0 Now this dataset can make best. Before open next dataset you can uses delete content.
May this demo help to you http://www.mi-perm.ru/gis/earth/present/networklink.htm


UTM zones example also. It's maybe good example of grid generation.
http://bbs.keyhole.com/ubb/showflat.php?Number=331020
See Ctrl+Click also. On Mac it is other command.

---

Ideally I'd like for the grid names to fall on two lines:

SFO
123
-----
It is problem. While GE not support two lines in labels.
Maybe for you in small cells for labels uses numbers only? And change color for next (not SFO) regions? It is solution for different names.

Jeff AKA JKurtock absolute right. Your quest not very easy.

Way for this maybe:
1. "I've done this completely through data massaging in Excel and BBEdit - I wonder if there's a better way." - ideal step
Need only cell polygons+ center labels, not lines. In polygon baloon you can after also add need links, search by site...

2. "After I finish California, perhaps I'll do the rest of the country. And then, of course, there's the new 'cell' grid system that will have different names for each grid. I'll implement that later" - if you make cells then can use http://earth.google.com/kml/kml_21tutorial.html#workingregions . For lines it is problem.

Val

simon_a

unread,
Nov 12, 2006, 9:20:40 AM11/12/06
to KML Discussions
Hello,

A couple of things to add after your last post:

Quote:

Ideally I'd like for the grid names to fall on two lines:

SFO
123

instead of:

SFO 123



Unfortunately, labels all go on one line The only way to get the line break would be to create an image and use a ground overlay instead of a label, which probably won't look quite so nice.

Quote:

I'd also like them to turn off when they start cluttering.



Regions will help with this (you seem to know the purpose of this functionality already) but there is also a new feature in the very latest release of Beta 4 that will move overlapping icons apart so you can see them all/click on them when you click on the bunch.

Quote:

And I suppose hoping to type that number into a search box and have it zoom to the proper grid is asking a little too much?



Yes, that's asking too much Actually, although the search box won't help (that searches the GE servers only), you can search through my places by clicking on it (or a sub-folder) and choosing Edit > Find (or hitting [CTRL]+F), so searching is possible.

Good luck with your project - it sounds very interesting!



Cheers,

Simon.

JKurtock

unread,
Nov 12, 2006, 12:28:57 PM11/12/06
to KML Discussions
Hey! Good job! (I'm starting to think you're not the newbie you claim.)

As Simon_a mentioned, you can't really access the GE search-by-name function.

But ... if you're really getting into this, you should consider the GE COM API. http://bbs.keyhole.com/ubb/showthreaded.php/Cat/0/Number/613507/an/0/page/0#613507

The API is a different sort of animal. Within a host application (I like using Excel, because VBA (Visual Basic for Applications) support for COM objects is easier than with, say, C++) you can provide a button, which when pushed will change the view in (simultaneously running) Google Earth. So you can write your own search functions, control visibility of labels and lines, and so on.

Or, even better, you can access your existing database of "where things are" and then update your Google Earth display! Search the Community for some impressive applications that display real-time locations of commercial aircraft.

But your users have to have Excel.

You can also write a Google API function in JavaScript, so anyone with a browser can access your code, but for now that's beyond me.

- Jeff

accordionman

unread,
Nov 13, 2006, 1:44:29 PM11/13/06
to KML Discussions
Quote:

And I suppose hoping to type that number into a search box and have it zoom to the proper grid is asking a little too much?




You can't do that with Google Earth's search box.

BUT:

You could write a web page to do this. Your top-level grid could have a search link in it's description bubble that takes users to a web page, where they could type in their search criteria. The search results would then come back as KML, placing a copy of the grid they've searched for in the Temporary Places folder, and zooming to it.

Unfortunately, you would end up with two copies of the grid square: one in the top-level grid, and again in the search results. So you'll also see two identical labels on the map.

You could possibly avoid this by returning a Placemark with a geometry but no name, or by setting the LabelStyle font size to 0.

Or, if you are comfortable setting your own LookAt parameters, return just a Document (with no content) with LookAt parameters pointing to the proper zoom area.

Valery35

unread,
Nov 13, 2006, 3:35:41 PM11/13/06
to KML Discussions
See
http://bbs.keyhole.com/ubb/showflat.php?Cat=&Number=682923
I generate USGS Grid as polygons. I use LOD by scale only.

LandisB

unread,
Dec 12, 2006, 2:34:16 AM12/12/06
to KML Discussions
Hey thanks for the help everyone, and the doubt as to my newbie status. I definitely am - but I'm learning quick.

Attached is my latest attempt. I'm wondering if any of you experienced in regions and settings styles and the such would be willing to offer suggestions to make this better. It's coming along pretty well.

So far I've managed to do most of the KML output from Excel so that I can just specify the bounds of the area to be gridded and then copy and paste the XML to a text file, add the headers and footers, and move along.

I'd like to be able to use the regions such that the grid is only visible when zoomed in (as it is from vertical). Unfortunately when one tilts the view all of a sudden the grid disappears. I'm guessing it's because I'm expanding the amount of area that is displayed on the screen, but I'd like to be able to view the terrain from an angle without losing the grid. If I change the LOD pixel settings I'll start seeing the grid too far out.

Of course any other suggestions on things I haven't thought of would be greatly appreciated as well.

Almost there....
715716-ExcelCreatedKMLTest2.kml

Forkboy2

unread,
Dec 21, 2006, 4:34:02 AM12/21/06
to KML Discussions
Not sure if this is of any use to you, but I have added Sectionals for all of US to GE. KML is attached to this post.

Matt
726335-sect6_nl.kml

LandisB

unread,
Dec 21, 2006, 1:31:15 PM12/21/06
to KML Discussions
Oh, it is definitely a use to me and I already had a version of your sectional layers to go under these grids. These are great, even if they do slow things down quite a bit. You don't happen to have an offline version available that might make things go a little faster during a SAR? Or maybe I could create my own just for California and keep your layer for downloading the other states should I ever need it.

Another question: with an older version of this (I'm pretty sure you had created it) there were tiles that just automatically turned on without the user needing to enable a particular sectional. Why did you change that method for this one where we have to identify the sectional, enable it, and then the whole thing loads?

Thanks for this!

Attached is the near final version of this grid which I think has turned out very well thanks to the help in this thread.
726861-CAWG-CAPSearchGrids.kmz
Reply all
Reply to author
Forward
0 new messages