Archive for the ‘Uncategorized’ Category

Embedding a KML File Index Into Your Website

Wednesday, September 23rd, 2009

WeoGeo Library Administrators and Market Providers can share or advertise their WeoGeo datasets outside of the WeoGeo website. For example, this TerraColor wiki entry demonstrates a map of the US with roll-over links to the individual Panel 5:CUSTOMIZE pages, where the datasets can be purchased.

Here, I want to demonstrate how to use WeoGeo APIs and some Python code to aggregate select WeoGeo Preview KML files into a “KML File Index”. This type of KML File Index can be used to share and market the content stored in your Library and Market accounts.

This example was developed for WeoGeo Market Provider ATLIS Geomatics, who requested an index of their WeoGeo Market Listings for their corporate web pages. They wanted one index for each of the cities where they held high resolution air photos.

WeoGeo provides an API for obtaining dataset details in the following formats WeoFile (XML), KML, and json. The wiki article shows how to curl the request but you can also preview the responses (in a web-browser) using the following URI structure:

http://market.weogeo.com/datasets/<token>.weo

For example:

http://market.weogeo.com/datasets/9a764fe6-3903-8151-b824-8a11a6f00552.kml

or

http://market.weogeo.com/datasets/9a764fe6-3903-8151-b824-8a11a6f00552.json

This is the same link found in the lower left corner of Panel 4:PREVIEW.

Preview KML

Preview KML

Those individual dataset KML file descriptions will be aggregated into a single KML File Index viewable within KML-readers like Google Earth, Bing Maps, ArcGIS Explorer, or NASA WorldWind.

Creating the KML File Index

  1. First, we need to obtain a list of tokens that uniquely identify the datasets to be included.  This can be accomplished with an API call.For example: curl -g -u <api key>: \
    'http://<subdomain>.weogeo.com/datasets.weo?&page=1&scale=0' > ./datasets.xml

    curl -g -u <api_key>: \
    'http://<subdomain>.weogeo.com/datasets.weo?&page=2&scale=0' >> ./datasets.xml
    ...
  2. Next, we extract the tokens from the resulting XML file and write them into a plain text file with one token per line.  A Python script for this step can be found in WeoGeo’s Public Code Repository.
  3. Lastly, a Python script is used to:
    1. invoke the WeoGeo API and obtain the KML Preview for each dataset (via it’s token)
    2. merge them into one KML File Index

There are also optional flags in this script to in/exclude the externally hosted preview image inside the wireframe or to create a stand-alone KMZ file that includes the preview images.

The resulting KML/KMZ can be viewed in a variety of applications including Google Maps, Google Earth, Bing Maps, OpenLayers, and many others.

http://kml.community.weogeo.com/ATLIS/atlis_calgary.kml

Using the Static URI embedded in each of the Preview KML files inside the KML File Index, ATLIS customers can now jump from an ATLIS web page directly to the WeoGeo Market page for that dataset.  This allows their customers to browse datasets on their website but customize and purchase on the WeoGeo Market. You can view the results on their Coverage Maps webpage.

To learn more about the APIs that were used, check out the WeoGeo API wiki pages. Also check out the Python code used to interact with the WeoGeo APIs and produce the KML File Index on Google Code.

Checking Out WordPress for iPhone App

Saturday, March 28th, 2009

Hello World!

LinkedIn Applications

Thursday, October 30th, 2008

I just installed the WordPress and TripIt Applications to my LinkedIn account.  I’ve been a fan of TripIt for a while; it has proved really useful for single page prints of my itinerary and sharing that info with my signficant other.  Just now, it helped me to see who in my network will be at the ASPRS Pecora17 conference!  I’m not sure about the WordPress plugin yet because I chose the option to only show posts Tagged with LinkedIn.  This will be the first.

Nashville Tornadoes

Thursday, February 7th, 2008

Listening to NPR while driving to work this morning, I heard interviews with survivors of the recent tornadoes. Some of them were from the Nashville area and I was just yesterday processing air photos from that area (taken in March 2007). I pulled the XY locations of the reported tornadoes from the NOAA storm prediction center and intersected them with the mosaics that I made yesterday.

Sure enough, six of the touchdowns were within the extent of coverage. The images from this air photo campaign are currently in transit (I dropped them at FedEx last night) from our Tampa office to our Portland office where they will be uploaded to WeoGeo. I’m going to ask our guys on that end to prioritize these so that they are available ASAP. I hope that they will be helpful in the disaster recovery efforts.

Update:

The Static URIs for each of the files above are here:

‘BNA18_19_9_10_p_m.tif’
http://www.weogeo.com/#/original_data_map/1a66f4653bde7c7e4f94e3cf83222556
‘BNA2_3_29_30_p_m.tif’
http://www.weogeo.com/#/original_data_map/2e88af64d93b53bb9b67a0b926f76598
‘BNA4_5_27_28_p_m.tif’
http://www.weogeo.com/#/original_data_map/2aa1560fa9a13383544d1b10a28378bd
‘BNA6_7_27_28_p_m.tif’
http://www.weogeo.com/#/original_data_map/94594d76dc940407084681e3acbee456
‘BNA8_9_25_26_p_m.tif’
http://www.weogeo.com/#/original_data_map/50a93d683a24280343107199cc31da96
‘BNA8_9_27_28_p_m.tif’
http://www.weogeo.com/#/original_data_map/93f3a4350c4f4931ab53e6831b00cef9

GIS Day 2008

Wednesday, November 14th, 2007

Multimedia message

Trackback Spam

Thursday, November 8th, 2007

This WPMu site has been flooded with Trackback Spam.

I’ve just implemented a fix (I hope) and this post will test if legitimate ones still work.

Here is a link to an old post: http://blogs.weogeo.com/dandye/2007/10/28/links-for-2007-10-28/

Latest Blog Posts

Wednesday, October 17th, 2007

If all goes well, this post will be on the front page of WeoGeo in about 15 minutes.

Sunday, October 7th, 2007

BlinkGeo » An Interview with a Geospatial Startup: WeoGeo:

Amazon’s S3 and EC2 web services are starting to garner more attention as a viable means for companies/organizations to leverage Amazon’s robust infrastructure to store and deliver [geospatial] content via the web. … WeoGeo is a Florida-based startup that has tapped into these two web services to host/deliver various types of geospatial content in a promising new way.

Sunday, August 12th, 2007

Discussion Papers | OGC®:

GeoDDS Mass Market (formerly GeoRSS) Interoperability Program Report 0.0.1 07-004 Panagiotis (Peter) A. Vretanos 2007-05-07 This OpenGIS(r) document describes the API for two web services capable of generating several simplified data formats including GeoRSS and the Basic XML Feature Schema (BXFS).

Saturday, August 11th, 2007

Google’s Next-Gen of Sneakernet:

How do you get 120 terabytes of data — the equivalent of 123,000 iPod shuffles (roughly 30 million songs) — from A to B? For the most part, the old-fashioned way: via a sneakernet.