Thursday, October 21, 2010

Using USGS High Resolution Orthoimagery in JOSM

One of CarbonCloud’s recent article pointed me to USGS Seamless Data Warehouse, where many high resolution orthoimagery data is distributed as OGC WMS. It’s a perfect base map option for OSM contributors using JOSM because of the following reasons:
  • The super image quality and resolution (0.25 foot to 2.5 foot);
  • Distributed through open standard based interface (WMS), which can be directly used in JOSM;
  • Compatibility with OSM license makes it legal to be used to derive OSM data on. (features digitized based on Google Maps and Bings are actually considered as derivative work of them, which then is copyrighted)
An obvious disadvantage though is the data coverage because only very limited area are covered by those orthoimagery data. See data availability.
Here are some basic steps to use USGS high resolution orthoimagery in JOSM:
1. Install JOSM and WMS plugin
2. Find the WMS containing the orthoimagery data that covers the area you’re interested in
Here is the list of available WMS services and you can probably tell the covered area by service name. For example, I am interested in making some OSM edits in Redlands, CA, United States, so I pick the WMS USGS_EDC_Ortho_California, in which there is particular layer for Riverside and San Bernardino counties.
Untitled
3. Start JOSM and load the WMS layer in JOSM WMS plugin
After you download the data from OSM in JOSM, you need to register WMS USGS_EDC_Ortho_California in JOSM through WMS Plugin Preference. So just go to Edit—>Preferences—>WMS tab;
image
Click “Add”, and type in a name and url as part of a WMS GetMap request
image
It’s a little tricky for WMS URL because you need to append a few GetMap request parameters manually. It seems to me that JOSM WMS plugin will only automatically populate “BBOX” parameter so you must manually complete other request parameters. Here is the URL that I came up with:
http://imsortho.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_Ortho_California?VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&LAYERS=Riverside-SanBernardinoCA_0.3m_Color_Mar_2008&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE&
Notice that I indicate the layer “Riverside-SanBernardinoCA_0.3m_Color_Mar_2008”, which is the area I am interested in.
Note: you should request WMS map in WGS84 (EPSG:4326) because the OSM data overlay on it are all in longitude and latitude.
That’s it, enjoy the armchair mapping!
Below is a snapshot of JOSM with high resolution orthoimagery as base map
image
Same area with Yahoo Imagery as a comparison
image
Is that amazing! Only a little issue of JOSM WMS plugin itself though: if you zoom in after loading the WMS image you need to delete and add the same WMS again to refresh data from WMS, otherwise the image at previous zoom level will simply be resample and used.

This OSM wiki page has a lot of useful information regarding using USGS High Resolution Orthoimagery in JOSM too.