03.01.2015 Views

Experiments with Google Earth and Google Maps

Experiments with Google Earth and Google Maps

Experiments with Google Earth and Google Maps

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Experiments</strong> <strong>with</strong> <strong>Google</strong><br />

<strong>Earth</strong> <strong>and</strong> <strong>Google</strong> <strong>Maps</strong><br />

Kirk Keller <strong>and</strong> Mark Brunner


Where It All Began<br />

► Desire to provide up to date brochures on dem<strong>and</strong><br />

to the public via the Web complete <strong>with</strong> maps<br />

• Want to pull Area information from database<br />

• H<strong>and</strong> drawn maps could not be updated <strong>and</strong> uploaded<br />

in a timely manner<br />

► Looking for something flashy <strong>and</strong> quick to market<br />

• <strong>Google</strong> <strong>Maps</strong> was changing the way the public was<br />

using <strong>and</strong> expecting online maps<br />

• <strong>Google</strong> <strong>Earth</strong> was a hot new thing


<strong>Google</strong> <strong>Earth</strong><br />

► KML File – Keyhole Markup Language<br />

• XML grammar <strong>and</strong> file format for modeling <strong>and</strong> storing<br />

geographic features for <strong>Google</strong> <strong>Earth</strong><br />

• Open <strong>and</strong> Close HTML Type Tags<br />

<br />

<br />

long,lat,alt<br />

long,lat,alt<br />

long,lat,alt<br />

long,lat,alt<br />

long,lat,alt<br />

long,lat,alt<br />

long,lat,alt<br />

long,lat,alt<br />

<br />


Build KML Process – Step 1<br />

► Ingest Shapefile<br />

• Decode File Structure <strong>and</strong> Parse Data<br />

►“ESRI<br />

Shapefile Technical Description”<br />

• An ESRI White Paper – July 1998<br />

►Convert Points from UTM to Latitude/Longitude<br />

• Save Polygon Points as Component Pieces<br />

►Placemarks<br />

• DBF Data<br />

• Calculated Midpoint Lat/Long<br />

►Parts<br />

• Individual Ring Direction (Inner Ring vs Outer Ring)<br />

►Points<br />

• Longitude/Latitude/Altitude<br />

• Point Order


Build KML Process – Step 2<br />

►Create Create KML File<br />

• Write basic header information for all objects<br />

►Placemark<br />

attributes – Icon graphics/characteristics<br />

►Polygon attributes – Line color/weight, Zoom level<br />

• Loop through each shape to write Placemarks<br />

►Description information from various databases<br />

• Shapefile DBF, L<strong>and</strong>s, Atlas, Regulations<br />

►Point Point at area midpoint <strong>with</strong> icon<br />

►Polygon points organized in sequence<br />

• Outer rings for main shapes<br />

• Inner rings for exclusions


Distributing KML to Public<br />

► Issues <strong>with</strong> basic KML file<br />

• Resulting KML is 6MB<br />

►Too large for casual download<br />

►Zipped file (KMZ(<br />

KMZ) ) is 1MB<br />

• If public saves Temporary Places then they will not be<br />

updated as KML is changed<br />

► Use NetworkLink in separate KML<br />

• Reference to real KML is all that is saved in Temporary<br />

Places<br />

• Real KML will be loaded fresh each time <strong>Google</strong> <strong>Earth</strong><br />

loads the NetworkLink reference


NetworkLink Example<br />

<br />

<br />

<br />

MDC Areas<br />

<br />

<br />

http://mdc4.mdc.mo.gov/<strong>Google</strong>/MDCareas.kmzhttp://mdc4.mdc.mo.gov/<strong>Google</strong>/MDCareas.kmz<br />

onceonce<br />

<br />

<br />

<br />


Demo Goggle <strong>Earth</strong><br />

Area KML File


<strong>Google</strong> <strong>Maps</strong><br />

►KMLKML file is too large for <strong>Google</strong> <strong>Maps</strong> to<br />

h<strong>and</strong>le in one shot<br />

• Multiple separate KML files would be unwieldy<br />

to maintain<br />

►Why Why not dynamically create shapes as they<br />

are requested<br />

• Need shape information in database<br />

►Use the Placemark, , Part, <strong>and</strong> Point tables created in<br />

the shapefile ingestion process


Demo Goggle <strong>Maps</strong><br />

Area Lookup


<strong>Google</strong> <strong>Maps</strong><br />

►<strong>Google</strong> <strong>Google</strong> maps allows for 'social mapping' or<br />

'crowd sourcing'<br />

►Federal, Federal, state <strong>and</strong> local agencies can make<br />

xml markup (GeoRSS(<br />

GeoRSS) ) available to each<br />

other <strong>and</strong> the public<br />

►Each Each of these agencies (or the public) can<br />

aggregate this data <strong>and</strong> quickly build a map


<strong>Google</strong> map syndication<br />

►Missouri Missouri River Water Trails<br />

►Phase Phase I: manually pull <strong>and</strong> validate data<br />

from various city, commerical, , state <strong>and</strong><br />

federal agencies<br />

►Phase Phase II: pull this data from xml feeds on<br />

participants Web sites


How it works<br />

►City City builds xml file on their site listing points<br />

of interest<br />

►City City pulls that xml into a <strong>Google</strong> map for<br />

their own site<br />

►Aggregation sites (like Mo River Water Trail)<br />

looks at the city xml file <strong>and</strong> pulls relevantly<br />

tagged items<br />

►Result: Result: City information is kept up to date<br />

on aggregation sites


Demo Goggle <strong>Maps</strong><br />

GeoRSS Feeds


Experimentation Opportunities<br />

►Hackers Hackers Ball<br />

• Examples of <strong>Google</strong> <strong>Earth</strong> <strong>and</strong> <strong>Google</strong> <strong>Maps</strong><br />

implementations to play <strong>with</strong><br />

►Wednesday Workshop<br />

• Tool available to create your own KML file from<br />

shapefile <strong>and</strong> DBF<br />

• Creation of GeoRSS files to feed <strong>Google</strong> <strong>Maps</strong><br />

along <strong>with</strong> explanation of how to build a<br />

syndication framework

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!