<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>new jersey geographer &#187; python</title>
	<atom:link href="http://njgeo.org/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://njgeo.org</link>
	<description>GIS and planning in New Jersey</description>
	<lastBuildDate>Wed, 09 May 2012 13:03:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Pulling data from OSM using XAPI, bringing it to ArcGIS</title>
		<link>http://njgeo.org/2012/05/09/pulling-data-from-osm-using-xapi-bringing-it-to-arcgis/</link>
		<comments>http://njgeo.org/2012/05/09/pulling-data-from-osm-using-xapi-bringing-it-to-arcgis/#comments</comments>
		<pubDate>Wed, 09 May 2012 13:03:41 +0000</pubDate>
		<dc:creator>John Reiser</dc:creator>
				<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools and Scripts]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[mapquest]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[xapi]]></category>

		<guid isPermaLink="false">http://njgeo.org/?p=683</guid>
		<description><![CDATA[I was recently asked by a friend if I knew of an ArcGIS-friendly data set representing the highway interchanges within New Jersey. I knew the information was already available in OpenStreetMap, but how could I quickly pull just the highway &#8230; <a href="http://njgeo.org/2012/05/09/pulling-data-from-osm-using-xapi-bringing-it-to-arcgis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was recently asked by a friend if I knew of an ArcGIS-friendly data set representing the highway interchanges within New Jersey. I knew the information was already available in <a title="OSM at the NJ Turnpike/Garden State Parkway interchange." href="http://www.openstreetmap.org/?lat=40.54218&amp;lon=-74.29841&amp;zoom=15&amp;layers=M">OpenStreetMap</a>, but how could I quickly pull just the highway interchanges out of OSM and bring them into ArcGIS?</p>
<p>Using the <a href="http://wiki.openstreetmap.org/wiki/XAPI">XAPI</a>, I was able to pull just the relevant information from OSM. In this case, I only wanted <a href="http://wiki.openstreetmap.org/wiki/Node">nodes</a> that contained <a href="http://wiki.openstreetmap.org/wiki/Motorway_junction">a highway key with the value of motorway_junction</a>. I used <a href="http://mapquest.com/">MapQuest</a>&#8216;s <a href="http://developer.mapquest.com/web/products/open/xapi">XAPI service</a> and quickly generated a URL using <a href="http://harrywood.co.uk/maps/uixapi/xapi.html">a nifty map mashup</a>. I had to manipulate the XAPI URL manually to change the bounding box; New Jersey was too large to search with a statewide bbox, so I broke the state into four portions by changing the latitude ranges. Making smaller requests for the part of the state between latitude 39 and 40, then 40 and 41, allowed my request to go through without timing out.</p>
<p>I was then left with four XML files that contained the highway interchanges. ArcGIS doesn&#8217;t know what to do with this, so <a href="https://gist.github.com/2641539">I whipped up some Python to convert all four tables into one tab-delimited file</a>. This code (included below) can then be used to add the points to ArcMap using the Add XY Data functionality.</p>
<p>All said and done, this project took me about an hour. I was able to send the data off in about 30 minutes, but then spent another thirty minutes cleaning up the script, modifying it to spit out any available key, not just the &#8220;ref&#8221; tag. The script is GPL, free for you to use as you see fit. <a href="http://wiki.openstreetmap.org/wiki/Legal_FAQ#I_would_like_to_use_OpenStreetMap_maps._How_should_I_credit_you.3F">Just remember to give credit where it&#8217;s due, attributing your data back to OSM. </a></p>
<p>Taking the time to do this for a friend is a good reminder of why I push our students to do more than just the GIS curriculum. Being familiar with OSM gives you a different point of view on GIS data, schema, and community than what you would gain from most GIS courses and entry-level positions. GIS is already about problem solving; being able to do some basic programming will enable you to tackle much larger problems efficiently. And providing technical assistance to others just makes you a better person.</p>
<p><script src="https://gist.github.com/2641539.js"> </script></p>
<hr />
<p><small>© John Reiser for <a href="http://njgeo.org">new jersey geographer</a>, 2012. |
<a href="http://njgeo.org/2012/05/09/pulling-data-from-osm-using-xapi-bringing-it-to-arcgis/">Permalink</a> |
<a href="http://njgeo.org/2012/05/09/pulling-data-from-osm-using-xapi-bringing-it-to-arcgis/#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://njgeo.org/2012/05/09/pulling-data-from-osm-using-xapi-bringing-it-to-arcgis/&title=Pulling data from OSM using XAPI, bringing it to ArcGIS">del.icio.us</a>
<br/>
Post tags: <a href="http://njgeo.org/tag/github/" rel="tag">github</a>, <a href="http://njgeo.org/tag/mapquest/" rel="tag">mapquest</a>, <a href="http://njgeo.org/tag/openstreetmap/" rel="tag">OpenStreetMap</a>, <a href="http://njgeo.org/tag/python/" rel="tag">python</a>, <a href="http://njgeo.org/tag/scripts/" rel="tag">scripts</a>, <a href="http://njgeo.org/tag/xapi/" rel="tag">xapi</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://njgeo.org/2012/05/09/pulling-data-from-osm-using-xapi-bringing-it-to-arcgis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Repetitive tasks are what computers do best.</title>
		<link>http://njgeo.org/2011/01/06/repetitive-tasks-are-what-computers-do-best/</link>
		<comments>http://njgeo.org/2011/01/06/repetitive-tasks-are-what-computers-do-best/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 03:50:33 +0000</pubDate>
		<dc:creator>John Reiser</dc:creator>
				<category><![CDATA[ESRI]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AML]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Avenue]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://njgeo.org/?p=460</guid>
		<description><![CDATA[Python is worlds apart from VB in all the right ways. <a href="http://njgeo.org/2011/01/06/repetitive-tasks-are-what-computers-do-best/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.spatiallyadjusted.com/2011/01/03/2011-the-year-python-takes-over-gis/">James Fee recently noted that 2011 will be the year of scripting GIS tasks using Python.</a> I&#8217;d like to share a few thoughts I had while reading his writeup.</p>
<p>Back in 2003, when I was learning GIS using ArcGIS 8, I wanted to put together a map of lottery winners in New Jersey by ZIP code. (<a href="http://www.njstateatlas.com/luck/">I&#8217;ve since recreated the map as a set of interactive web maps.</a>) I wrote a quick and dirty script in Perl that hit the State Lottery&#8217;s website and downloaded the number of winners in each ZIP code. After I came out of &#8220;the zone&#8221; and watched the script work away, I thought, &#8220;why can&#8217;t I do that with ArcGIS?&#8221; I wasn&#8217;t going to manually type in each ZIP code and insert my findings into a table. Considering it was a &#8220;let&#8217;s see if I can do it&#8221; project, I would have likely lost interest before getting all of my data. I knew better than to go the data-entry route and wrote a script to do it for me. Repetitive, mindless tasks are what computers do best &#8211; I was able to have it gather data (tedious, but necessary) to allow me to make the maps (the fun part) in an afternoon. Being able to automate some of the tedious aspects of GIS would be a blessing.</p>
<p>(...)<br/>Read the rest of <a href="http://njgeo.org/2011/01/06/repetitive-tasks-are-what-computers-do-best/">Repetitive tasks are what computers do best.</a> on my blog. </p>
<hr />
<p><small>© John Reiser for <a href="http://njgeo.org">new jersey geographer</a>, 2011. |
<a href="http://njgeo.org/2011/01/06/repetitive-tasks-are-what-computers-do-best/">Permalink</a> |
<a href="http://njgeo.org/2011/01/06/repetitive-tasks-are-what-computers-do-best/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://njgeo.org/2011/01/06/repetitive-tasks-are-what-computers-do-best/&title=Repetitive tasks are what computers do best.">del.icio.us</a>
<br/>
Post tags: <a href="http://njgeo.org/tag/aml/" rel="tag">AML</a>, <a href="http://njgeo.org/tag/arcgis/" rel="tag">ArcGIS</a>, <a href="http://njgeo.org/tag/avenue/" rel="tag">Avenue</a>, <a href="http://njgeo.org/tag/esri/" rel="tag">ESRI</a>, <a href="http://njgeo.org/tag/python/" rel="tag">python</a>, <a href="http://njgeo.org/tag/scripting/" rel="tag">scripting</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://njgeo.org/2011/01/06/repetitive-tasks-are-what-computers-do-best/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script: Geotagged Photos to GIS</title>
		<link>http://njgeo.org/2010/06/01/script-geotagged-photos-to-gis/</link>
		<comments>http://njgeo.org/2010/06/01/script-geotagged-photos-to-gis/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 14:49:33 +0000</pubDate>
		<dc:creator>John Reiser</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[ESRI]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[National Guard]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[SDSFIE]]></category>

		<guid isPermaLink="false">http://njgeo.org/?p=287</guid>
		<description><![CDATA[I think it's somewhat ridiculous that ArcGIS Explorer has the ability to add geotagged photos to the map, but ArcGIS Desktop doesn't have a built-in means of recognizing geotagged photos. <a href="http://njgeo.org/2010/06/01/script-geotagged-photos-to-gis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the data deliverables to the NJ National Guard as part of our GIS Internship program is photo and video documentation of the state&#8217;s Readiness Centers. There&#8217;s even a SDSFIE (a somewhat complicated, cumbersome data schema) entity type specifically for the location where photographs were taken. (Aside: it&#8217;s not surprising that &#8220;photograph_location_point&#8221; is in SDSFIE, because it seems like <a href="http://tools.sdsfie.org/browser/"><strong>everything</strong> is in SDSFIE.</a>) We have some cameras that have integrated GPS, so we&#8217;ve used them for documenting the field work. The problem was, &#8220;how do we get geotagged photos into GIS?&#8221;</p>
<p>I think it&#8217;s somewhat ridiculous that ArcGIS Explorer has the ability to add geotagged photos to the map, but ArcGIS Desktop doesn&#8217;t have a built-in means of recognizing geotagged photos. ArcCatalog already examines JPGs it finds for additional information in the case that the JPG is a spatially-aware aerial photo or a rectified map. Even a tool for creating a feature class out of geotagged photos would be great.(...)<br/>Read the rest of <a href="http://njgeo.org/2010/06/01/script-geotagged-photos-to-gis/">Script: Geotagged Photos to GIS</a> on my blog. </p>
<hr />
<p><small>© John Reiser for <a href="http://njgeo.org">new jersey geographer</a>, 2010. |
<a href="http://njgeo.org/2010/06/01/script-geotagged-photos-to-gis/">Permalink</a> |
<a href="http://njgeo.org/2010/06/01/script-geotagged-photos-to-gis/#comments">8 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://njgeo.org/2010/06/01/script-geotagged-photos-to-gis/&title=Script: Geotagged Photos to GIS">del.icio.us</a>
<br/>
Post tags: <a href="http://njgeo.org/tag/arcgis/" rel="tag">ArcGIS</a>, <a href="http://njgeo.org/tag/geotagging/" rel="tag">geotagging</a>, <a href="http://njgeo.org/tag/national-guard/" rel="tag">National Guard</a>, <a href="http://njgeo.org/tag/python/" rel="tag">python</a>, <a href="http://njgeo.org/tag/scripting/" rel="tag">scripting</a>, <a href="http://njgeo.org/tag/sdsfie/" rel="tag">SDSFIE</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://njgeo.org/2010/06/01/script-geotagged-photos-to-gis/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Updating OpenStreetMap with Land Use Data</title>
		<link>http://njgeo.org/2010/02/03/updating-osm-lu-data/</link>
		<comments>http://njgeo.org/2010/02/03/updating-osm-lu-data/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 19:34:44 +0000</pubDate>
		<dc:creator>John Reiser</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://njgeo.org/?p=221</guid>
		<description><![CDATA[Over the course of 2009, I got involved with OpenStreetMap. If you haven&#8217;t used OSM, I suggest you check it out. It&#8217;s being updated and used throughout the world, from mapping campuses in New Jersey to aiding the relief efforts &#8230; <a href="http://njgeo.org/2010/02/03/updating-osm-lu-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Over the course of 2009, I got involved with <a href="http://osm.org/" target="_blank">OpenStreetMap</a>. If you haven&#8217;t used OSM, I suggest you check it out. It&#8217;s being updated and used throughout the world, from <a href="http://osm.org/go/ZciXZggp-" target="_blank">mapping campuses in New Jersey</a> to <a href="http://wiki.openstreetmap.org/wiki/WikiProject_Haiti" target="_blank">aiding the relief efforts in Haiti</a>.</p>
<p>So, du<a href="http://njgeo.org/wp-content/uploads/2010/02/Screen-shot-2010-02-03-at-2.31.40-PM.png"><img class="alignright size-full wp-image-230" title="Land Use around Trenton" src="http://njgeo.org/wp-content/uploads/2010/02/Screen-shot-2010-02-03-at-2.31.40-PM.png" alt="Example from OSM of the imported land use polygons around Trenton, NJ." width="180" height="180" /></a>ring 2009, I had noticed that on OSM, the State of Georgia had <a href="http://en.wikipedia.org/wiki/Land_use">land use</a> data. I started to look into <a href="http://wiki.openstreetmap.org/wiki/Georgia_%28U.S._state%29#Land_Use">how Georgia was so lucky</a>. OSM relies on user contributions, so some savvy user must have added all of those polygons to the map. <a href="http://wiki.openstreetmap.org/wiki/User_talk:Liber">I contacted that savvy user</a> to find out more. Liber pointed me to some of the methods he and others <a href="http://wiki.openstreetmap.org/wiki/Imports">have used to import GIS </a><a href="http://wiki.openstreetmap.org/wiki/Imports">data</a> into OpenStreetMap. I was unsatisfied with the existing software, so I looked into <a href="http://wiki.openstreetmap.org/wiki/API_v0.6">the OSM API</a> and wrote my own code to export directly from <a href="http://support.esri.com/index.cfm?d=30028&amp;fa=knowledgebase.techarticles.articleShow">ArcGIS</a> into <a href="http://wiki.openstreetmap.org/wiki/.osm">the .osm file format</a>.</p>
<p><a href="http://users.rowan.edu/~reiser/osm/">ExportToOSM.py</a> is my crack at programming an export utility. I wanted something that would export <a href="http://support.esri.com/index.cfm?fa=knowledgebase.gisDictionary.search&amp;searchTerm=multipart+feature">multipolygons</a> from ArcGIS as <a href="http://wiki.openstreetmap.org/wiki/Relation:multipolygon">OSM multipolygon relations</a> and would produce a file free of redundant <a href="http://wiki.openstreetmap.org/wiki/Nodes#Node">nodes</a>. I used an earlier version of my script <a href="http://osm.org/go/ZciXZKQ6s--">to export the buildings on Rowan&#8217;s campus</a>. After fixing a few issues &#8211; namely the multipart polygons (take a look at Evergreen Hall, still need to punch in the interior courtyard as a doughnut hole) &#8211; I began developing a plan to export <a href="http://nj.gov/dep/gis/lulc02cshp.html">NJ&#8217;s 2002 Land Use data</a> to OSM.</p>
<p>(...)<br/>Read the rest of <a href="http://njgeo.org/2010/02/03/updating-osm-lu-data/">Updating OpenStreetMap with Land Use Data</a> on my blog. </p>
<hr />
<p><small>© John Reiser for <a href="http://njgeo.org">new jersey geographer</a>, 2010. |
<a href="http://njgeo.org/2010/02/03/updating-osm-lu-data/">Permalink</a> |
<a href="http://njgeo.org/2010/02/03/updating-osm-lu-data/#comments">2 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://njgeo.org/2010/02/03/updating-osm-lu-data/&title=Updating OpenStreetMap with Land Use Data">del.icio.us</a>
<br/>
Post tags: <a href="http://njgeo.org/tag/openstreetmap/" rel="tag">OpenStreetMap</a>, <a href="http://njgeo.org/tag/programming/" rel="tag">programming</a>, <a href="http://njgeo.org/tag/python/" rel="tag">python</a>, <a href="http://njgeo.org/tag/scripting/" rel="tag">scripting</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://njgeo.org/2010/02/03/updating-osm-lu-data/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

