70 likes | 339 Views
1 – Incorporating a Google Maps instance into your website. Sign up for a API key http://code.google.com/apis/maps/signup.html Good for one web directory Cut and paste the example snippet into a new HTML document Example: http://www.fsl.orst.edu/sdmg/googlemaps/index.html.
E N D
1 – Incorporating a Google Maps instance into your website • Sign up for a API key • http://code.google.com/apis/maps/signup.html • Good for one web directory • Cut and paste the example snippet into a new HTML document • Example: http://www.fsl.orst.edu/sdmg/googlemaps/index.html
1 – Incorporating a Google Maps instance into your website (cont.) • Read the API documentation and customize • Resizing the map • Adding controls • Adding random points • Documentation intro: • http://code.google.com/apis/maps/documentation/introduction.html • Examples: • http://code.google.com/apis/maps/documentation/examples/
2 – Converting your imagery into tiles that can be used by GE and GM (using GDAL2Tiles) • gdal2tiles is a Python script written primarily by Klokan Petr Přidal as a Google Summer of Code (SoC) project • Incorporated as a sample script with the GDAL-OGR distribution • Program tiles an image into many pyramid layers and creates the Keyhole Markup Language (KML) to navigate seamlessly between layers • For more info: • http://wiki.osgeo.org/wiki/GDAL2Tiles_SoC_2007
2 – Converting your imagery into tiles that can be used by GE and GM (using GDAL2Tiles) (cont.) • Convert your imagery into an RGB image • This can be accomplished with GDAL tools like gdal_translate (format changing, clipping), gdal_warp (projection) and pct2rgb.py (palette-to-RGB) • Run gdal2tiles.py with –forcekml flag, e.g: • gdal2tiles.py –forcekml temp3.tif • Output is a hierarchical directory structure with clipped (128x128) images • Can be viewed in either Google Earth or Google Maps
3 – Creating ‘plot footprint’ KML from coordinate files • We needed a system of ‘plot screening’ – deciding which plots to use when modeling with GNN • We have screened in ArcMap with the 2005 NAIP, but context was sometimes hard to determine. • Because Google Earth has Oregon 2005 NAIP, we could screen in here as well • Needed to convert plot locations to KML
3 – Creating ‘plot footprint’ KML from coordinate files • KML reference: • http://code.google.com/apis/kml/ • Quick start guide: • http://code.google.com/apis/kml/documentation/kml_tut.html • Stack: • Python, GDAL-OGR, Genshi (*ML Processing Toolkit)
3 – Creating ‘plot footprint’ KML from coordinate files • Workflow: • Create points, subplots, pixel ‘footprints’ in native coordinate system • Project all coordinates from native system to WGS84 using OGR • In conjunction with a KML template, generate the KML for all plots using Genshi