<?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>Random Nodes &#187; Tutorial</title>
	<atom:link href="http://www.jasonbirch.com/nodes/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonbirch.com/nodes</link>
	<description>...Jason Birch's geospatial ramblings</description>
	<lastBuildDate>Wed, 01 Sep 2010 05:14:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>FWTools FTW &#8230; because GDAL FTW didn&#8217;t sound as cool!</title>
		<link>http://www.jasonbirch.com/nodes/2009/08/11/290/fwtools-ftw-gdal/</link>
		<comments>http://www.jasonbirch.com/nodes/2009/08/11/290/fwtools-ftw-gdal/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 07:32:16 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[MapGuide]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[FWTools]]></category>
		<category><![CDATA[GDAL]]></category>
		<category><![CDATA[Nanaimo]]></category>
		<category><![CDATA[NanaimoMap]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=290</guid>
		<description><![CDATA[I’ve received a bunch of compliments on the performance of the NanaimoMap application that the City of Nanaimo launched last week.  There is a lot involved in making a web map perform.  Hardware, vector generalization, and underlying mapping technology all play a role, but one of the most important parts of any successful web map is raster data optimization.  Read on to find out how FWTools (and GDAL) allowed me to handle this with ease.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve received a bunch of compliments on the performance of the <a href="http://maps.nanaimo.ca/nanaimomap/" title="Nanaimo Map">NanaimoMap</a> <a href="http://mapguide.osgeo.org/">MapGuide</a> / <a href="http://trac.osgeo.org/fusion">Fusion</a> application that the <a href="http://www.nanaimo.ca/">City of Nanaimo</a> <a href="http://www.jasonbirch.com/nodes/2009/08/10/328/nanaimomap-testers-wanted/">launched in beta</a> last week.</p>
<p>There is a lot involved in making a web map perform, especially if you are not leveraging tile caching.  One part of the story is hardware, and I&#8217;m lucky enough to share space on a dual quad-core machine with 4GB RAM and relatively fast disk. Another part is proper generalization of the vector data for display; no point in carrying sub-micron precision on a map that will generally be displayed at 1:500 or smaller. And of course, there&#8217;s MapGuide&#8217;s inherent speed when properly configured. This leaves out one of the most important parts though: raster data.  </p>
<p>Raster data is big, brutish and hard to work with, and optimizing raster access is often one of the most important parts of delivering a successful web map.  Users have come to expect &#8220;satellite&#8221; imagery on their web maps, and complain when it doesn&#8217;t perform as well as Google Maps.  One of the best ways that I have found of flipping and folding raster data is Frank Warmerdam&#8217;s <a href="http://fwtools.maptools.org/">FWTools</a>, which wraps <a href="http://www.gdal.org/">GDAL</a> and some other utilities in a single easy-to-use package.</p>
<p>My starting point consisted of:</p>
<ul>
<li>  79 TIFF + Worldfile images, 10cm resolution, about 1.1GB each</li>
<li>  14 TIFF + Worldfile images, 30cm resolution, about 600MB each</li>
</ul>
<p>So, I was working with about 100GB of images, none of which were optimized for web-based display, and which did not contain the spatial reference information that the FDO Raster Provider (also based on GDAL!) works best with.</p>
<p>The first thing I did was set up a batch process to optimize the individual images.  This involved three steps:</p>
<p>1. Obtain a correct .prj file containing the WKT spatial reference information for my images.  The easiest place for me to get this was  <a href="http://spatialreference.org/">SpatialReference.org</a>, but you might just have one hanging around.</p>
<blockquote><p><a href="http://spatialreference.org/ref/epsg/26910/">http://spatialreference.org/ref/epsg/26910/</a></p></blockquote>
<p>2. Reprocess the image into a Tiled GeoTIFF, with no compression and a relatively large internal block size, and specifying the projection file obtained above.  The caret (^) is the DOS line continuation character:</p>
<p><code>gdal_translate   ^<br />
    -co "TILED=YES"   ^<br />
    -co "PROFILE=GEOTIFF"   ^<br />
    -co "INTERLEAVE=BAND"   ^<br />
    -co "BLOCKXSIZE=512"   ^<br />
    -co "BLOCKYSIZE=512"  ^<br />
    -a_srs utm83-10.prj  ^<br />
    infile.tif   ^<br />
    outfile.tif<br />
</code></p>
<p>You can obtain more information on <a href="http://gdal.org/gdal_translate.html">gdal_translate</a> and the <a href="http://gdal.org/frmt_gtiff.html">GeoTIFF options</a> on the GDAL website.  Depending on your source data and intended use, other values could be more appropriate, and you really should experiment.</p>
<p>3. Create internal pyramids in each image so that the entire image does not need to be fetched when zoomed out.  This is one of the easiest performance gains you can get if you can afford the extra disk space. </p>
<p><code>gdaladdo -r gauss output.tif 2 4 8 16 32 64 128<br />
</code></p>
<p>Once this was done, I had a really decent set of fast images to work with, but these would only be appropriate to load at large scales when only one or a very few of the images need to be opened on each map view.  For smaller scales, I needed to reduce the size of the images being processed, and also reduce the number of files being accessed on each fetch.  I decided to go with a simple two-tier approach:  Load the individual images at scales larger than some fixed value, and load a single overview image at scales smaller than that value.  </p>
<p>The only problem was that I did not have an appropriate overview image.  I wanted something that was relatively small, highly optimized, and which had white fill in its nodata areas.  Fortunately GDAL and the awesome folks in the #gdal channel at freenode came to the rescue again, this time with four steps.</p>
<p>1. The first thing I needed to do was build a list of all of the images I wanted to have as part of the overview and feed these into the <a href="http://gdal.org/gdalbuildvrt.html">gdalbuildvrt</a> command to build a single <a href="http://www.gdal.org/gdal_vrttut.html">virtual image</a>.  You could do this manually, but I have the awesome <a href="http://gnuwin32.sourceforge.net/">GnuWin32</a> utilities installed so used these instead; they&#8217;re almost enough to make me not miss the days when I spent most of my time in Unix:</p>
<p><code>find images/ -name "*.tif" | xargs gdalbuildvrt -resolution highest all_images.vrt<br />
</code></p>
<p>2. Because I wanted a white background on my overviews, I then edited the all_images.vrt, adding a &lt;NoDataValue/&gt; section at the top of each of the three &lt;VRTRasterBand /&gt; sections:</p>
<p><code>  &lt;VRTRasterBand dataType="Byte" band="1"&gt;<br />
    &lt;NoDataValue>255&lt;/NoDataValue&gt;<br />
</code></p>
<p>3. The <a href="http://gdal.org/gdalinfo.html">gdalinfo</a> command gave me the dimensions of the virtual image, each of which I then divided iteratively to give me reasonable overview dimensions which I could feed into gdal_translate.</p>
<p><code>gdal_translate   ^<br />
    -outsize 53120 14000   ^<br />
    -co "TILED=YES"   ^<br />
    -co "PROFILE=GEOTIFF"   ^<br />
    -co "INTERLEAVE=BAND"   ^<br />
    -co "BLOCKXSIZE=512"   ^<br />
    -co "BLOCKYSIZE=512"   ^<br />
    all_images.vrt   ^<br />
    all_images.tif<br />
</code></p>
<p>When this completed, I deleted the all_images.tif.aux.xml file because I did not want to carry the additional metadata that GDAL maintains in that file.  </p>
<p>Careful with sizes here.  If you&#8217;re using an application that supports it, you can specify the -CO &#8220;BIGTIFF=YES&#8221; option to generate files larger than 4GB, but you&#8217;re likely better off generating an intermediate level of aggregated and resampled tiles instead.</p>
<p>4. The final step was to once again generate internal pyramids to allow for better performance at small scales:</p>
<p><code>gdaladdo -r gauss all_images.tif 2 4 8 16 32 64 128<br />
</code></p>
<p>Once these two data sets were processed, I simply used <a href="http://trac.osgeo.org/mapguide/wiki/maestro">MapGuide Maestro</a> to make two raster data connections.  For the first data connection, I added all of the individual TIFF images to a composite raster type, and Maestro generated a configuration document which allows MapGuide to know which image to access for a given extent.  For the second layer, I just pointed to the overview GeoTiff.  I then created layers for these, experimented until I found the scale where the overview image started looking pixelated, and set the layers&#8217; view scale properties accordingly.  There are some notes on <a href="http://trac.osgeo.org/mapguide/wiki/maestro/UserGuides/RasterFeatureSource"> working with rasters</a> in the Maestro documentation.</p>
<p>More performance could probably be gained by having an intermediate level where the coverage area was aggregated into larger tiles before being combined into one large overview image, but for the initial launch this was deemed to have high enough performance.</p>
<p>On my production server, I&#8217;m lucky enough to have a fast, high-spindle-count RAID shelf dedicated to storing these uncompressed TIFFs, and they scream off the disk.  My test server is VMWare-based, and disk performance and space are both at a premium.  In this case, I still used the TIFF overview map, but at large scales I access a set of tiled MrSID files instead.  This seemed like a decent compromise given the constraints, but did seem to thrash the CPU a bit.</p>
<p>GDAL was one of the first open source geospatial applications I tried (not counting GRASS and MOSS) and is constantly coming in handy, whether I&#8217;m reprojecting, adding spatial reference information to images, or converting between formats.</p>
<p>Thanks to hobu (Howard Butler), FrankW (Frank Warmerdam) and EvenR (Even Rouault) from the #gdal IRC channel on freenode for helping me work my way to this solution.  Amazing support!</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2009/08/11/290/fwtools-ftw-gdal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQLite Spatial Files in FME 2009 through the Magic of FDO</title>
		<link>http://www.jasonbirch.com/nodes/2008/12/02/229/sqlite-spatial-files-in-fme-2009-through-the-magic-of-fdo/</link>
		<comments>http://www.jasonbirch.com/nodes/2008/12/02/229/sqlite-spatial-files-in-fme-2009-through-the-magic-of-fdo/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 06:11:47 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[FDO]]></category>
		<category><![CDATA[FME]]></category>
		<category><![CDATA[Formats]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=229</guid>
		<description><![CDATA[Writing the FDO/GDAL style of SQLite spatial files (see previous post for details) just got a LOT easier for those of us using Safe Software&#8217;s FME Desktop, even the affordable Base edition. Over the past month, developers at Safe Software and the author of the FDO SQLite provider have put some time into ensuring that [...]]]></description>
			<content:encoded><![CDATA[<p>Writing the <a href="http://trac.osgeo.org/fdo/wiki/FDORfc16">FDO/GDAL style</a> of SQLite spatial files (see <a href="http://www.jasonbirch.com/nodes/2008/05/06/184/sqlite-for-fdo-with-sugar-free-ogr/">previous post</a> for details) just got a LOT easier for those of us using Safe Software&#8217;s <a href="http://www.safe.com/products/desktop/overview.php">FME Desktop</a>, even the affordable <a href="http://www.safe.com/products/desktop/formats/index.php">Base edition</a>.</p>
<p>Over the past month, developers at Safe Software and the author of the FDO SQLite provider have put some time into ensuring that the SQLite provider will work properly with FME 2009.  Reading worked fine out of the box, but writing required a bit of effort.  FME needed datastore creation and schema writing added to their generic FDO writer, and the FDO SQLite provider needed to account for the way that FME writes to multiple schemas.</p>
<p>Here&#8217;s how you can take advantage of this provider in FME (and in other FDO 3.3 consumers, such as MapGuide Open Source 2.0):</p>
<ul>
<li><a href="http://www.jasonbirch.com/fdosqlite/FdoSQLiteProvider_3.3.0_r4270.zip">Download the unofficial binaries</a> for the SQLite provider from my site</li>
<li>Open this zipfile and copy the SQLiteProvider.dll file into your FDO directory (default c:\Program Files\FME\plugins\fdo\)</li>
<li>Make a backup of the providers.xml file in that directory, and then edit the original, adding the contents of the sqlite_provider_entry.xml file in an appropriate location.</li>
</ul>
<p>Once this installed, writing to SQLite from within FME is dead easy&#8230;</p>
<p>1. Add new FDO Destination Dataset:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2008/12/sqlite_fme001.png" alt="" title="sqlite_fme001" width="405" height="190" class="alignnone size-full wp-image-231" /></p>
<p>2. Go to Settings and specify OSGeo.SQLite.3.3 as the provider name:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2008/12/sqlite_fme002.png" alt="" title="sqlite_fme002" width="321" height="111" class="alignnone size-full wp-image-232" /></p>
<p>3: Specify the filename you want to write to:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2008/12/sqlite_fme003.png" alt="" title="sqlite_fme003" width="320" height="169" class="alignnone size-full wp-image-233" /></p>
<p>4. Optionally, set a spatial reference system, and click on OK:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2008/12/sqlite_fme004.png" alt="" title="sqlite_fme004" width="405" height="191" class="alignnone size-full wp-image-230" /></p>
<p>That&#8217;s it; now you can start adding tables to your SQLite file as you would any other destination dataset in FME!  </p>
<p>As far as I know, Safe will not be distributing the SQLite provider directly with FME 2009 (it&#8217;s still in beta) primarily because the provider is not officially being released for FDO 3.3, and partially because the provider is still under heavy development.  Fear not, though.  I am building this provider against the 3.3 branch as often as necessary, and will post binaries as I do.</p>
<p>The relative ease with which this format was supported by FME can be attributed to Safe&#8217;s foresight in exposing FDO directly, rather than just using it behind-the-scenes in their SDF3 writer.  They also allow <a href="http://www.safe.com/solutions/application/autocad.php">FME to act as an FDO provider</a>, which enables users of products that use FDO for their data layer (such as <a href="http://www.autodesk.com/map3d">AutoCAD Map 3D</a>) to access the full range of formats that FME supports.</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2008/12/02/229/sqlite-spatial-files-in-fme-2009-through-the-magic-of-fdo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing selection colour in MapGuide AJAX viewer</title>
		<link>http://www.jasonbirch.com/nodes/2008/12/02/213/changing-selection-colour-in-mapguide-ajax-viewer/</link>
		<comments>http://www.jasonbirch.com/nodes/2008/12/02/213/changing-selection-colour-in-mapguide-ajax-viewer/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 04:51:50 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[MapGuide]]></category>
		<category><![CDATA[OSGeo]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[selection colour]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=213</guid>
		<description><![CDATA[One of the annoyances that people have faced with MapGuide Open Source is that the selection colour was hard-coded in one of the C++ rendering functions. There were a few ways of getting around this without recompiling, but they were all a lot of work. RFC 38 included some code changes that made it possible [...]]]></description>
			<content:encoded><![CDATA[<p>One of the annoyances that people have faced with <a href="http://mapguide.osgeo.org/">MapGuide Open Source</a> is that the selection colour was hard-coded in <a href="http://trac.osgeo.org/mapguide/browser/branches/1.2.x/MgDev/Common/Stylization/GDRenderer.cpp#L1464">one of the C++ rendering functions</a>.  There were a few ways of getting around this without recompiling, but they were all a lot of work.  <a href="http://trac.osgeo.org/mapguide/wiki/MapGuideRfc38">RFC 38</a> included some <a href="http://trac.osgeo.org/mapguide/browser/branches/2.0.x/MgDev/Common/Renderers/GDRenderer.cpp#L1471">code changes</a> that made it possible to modify this value on the fly, but it doesn&#8217;t look like this capability was taken advantage of by the AJAX viewer that was distributed with MGOS 2.0.x.</p>
<p>If you&#8217;re using MapGuide Open Source 2.0 (2.0.2 recommended) and are not happy with the default blue selection colour, you can easily change it on a per-install basis by modifying the mapviewerajax template file.  This is located at:</p>
<blockquote><p>(INSTALLDIR)\WebServerExtensions\www\viewerfiles\ajaxmappane.templ</p></blockquote>
<p>You will need to find the function called RequestMapImage, which includes a line that looks like this:</p>
<p><code><br />
url = webAgent +<br />
 &quot;?OPERATION=GETDYNAMICMAPOVERLAYIMAGE&amp;FORMAT=PNG&amp;VERSION=1.0.0&amp;SESSION=&quot;<br />
+ sessionId + &quot;&amp;MAPNAME=&quot; + encodeComponent(mapName)<br />
+ &quot;&amp;SEQ=&quot; + Math.random();<br />
</code><br />
</p>
<p>You will need to modify this to change the VERSION to 2.0.0, and add the BEHAVIOR and SELECTIONCOLOR parameters:</p>
<p><code><br />
url = webAgent +<br />
 &quot;?OPERATION=GETDYNAMICMAPOVERLAYIMAGE&amp;FORMAT=PNG&amp;VERSION=<strong>2.0.0</strong>&amp;SESSION=&quot;<br />
 + sessionId + &quot;&amp;MAPNAME=&quot; + encodeComponent(mapName)<br />
 + &quot;&amp;SEQ=&quot; + Math.random() <strong>+ &quot;&amp;BEHAVIOR=7&amp;SELECTIONCOLOR=FF5300FF&quot;</strong>;<br />
</code><br />
</p>
<p>Before:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2008/12/mapguide_selection_colour_default.png" alt="" title="MapGuide Selection Colour Default" width="400" height="433" class="alignnone size-full wp-image-221" /></p>
<p>After:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2008/12/mapguide_selection_colour_modified1.png" alt="" title="MapGuide Selection Colour Modified" class="alignnone size-full wp-image-220" /></p>
<p>The BEHAVIOR parameter is a bitmask that controls what is rendered, and is described in <a href="http://trac.osgeo.org/mapguide/wiki/MapGuideRfc38">RFC 38</a>.  The SELECTIONCOLOR parameter is a hex string in <a href="http://en.wikipedia.org/wiki/RGBA_color_space">RGBA format</a>, or its integer equivalent.  Note for geeks:  the A (opacity) portion of the string is ignored; the server code masks this out of the passed value, and then adds 200 (C8) as the line opacity and 160 (A0) as the fill opacity.</p>
<p>Note, the mapagent call allows you the flexibility to add more complicated behaviour to your viewer, such as changing the selection colour dynamically based on the map name, but I&#8217;ll leave that as an exercise for the reader (mostly because I&#8217;m lazy and use Fusion anyway and wouldn&#8217;t benefit from the work).</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2008/12/02/213/changing-selection-colour-in-mapguide-ajax-viewer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MapServer at pair Networks</title>
		<link>http://www.jasonbirch.com/nodes/2008/04/07/183/mapserver-at-pair-networks/</link>
		<comments>http://www.jasonbirch.com/nodes/2008/04/07/183/mapserver-at-pair-networks/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 06:35:09 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[OSGeo]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[MapServer]]></category>
		<category><![CDATA[OSGeo4W]]></category>
		<category><![CDATA[pair Networks]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/2008/04/07/183/mapserver-at-pair-networks/</guid>
		<description><![CDATA[I have been happily hosted at pair Networks for about twelve years now. A few days ago, one of the users on their private newsgroups asked if anyone had compiled MapServer there. I had never compiled MapServer before, so I figured that I was incredibly qualified to help :) Normally MapServer appears to be fairly [...]]]></description>
			<content:encoded><![CDATA[<p>I have been happily hosted at <a href="http://www.pair.com/">pair Networks</a> for about twelve years now.  A few days ago, one of the users on their private newsgroups asked if anyone had compiled <a href="http://mapserver.osgeo.org/">MapServer</a> there.  I had never compiled MapServer before, so I figured that I was incredibly qualified to help :)</p>
<p>Normally MapServer appears to be fairly simple to install, but there were a couple annoying complications in my scenario.  The first was that pair Networks runs exclusively on FreeBSD.  The second was that it is an entirely managed service:  no root access allowed, no ability to run ldconfig, no changes to php.ini.  The net result was that all of the dependencies had to be compiled in static mode, and that a custom PHP CGI had to be used so that the extension_dir could be overridden.</p>
<p>The notes that I took during installation <a href="http://www.jasonbirch.com/files/install_mapserver_pair_networks_freebsd.txt">are available</a> if anyone is interested.  These are not guaranteed to be accurate, but are pretty close.  If you are on pair Networks and trust me (are you crazy?) you can see if <a href="http://www.jasonbirch.com/files/mapserver_pair.tar.gz">the binaries</a> (5 MB) work for you.  They are mostly static, so there shouldn&#8217;t be any dependencies other than the standard pair libraries, but you never know until you try&#8230;  </p>
<p>As long as I had it compiled I felt the need to play around.  I grabbed some test data from the awesome <a href="http://wiki.osgeo.org/wiki/OSGeo4W">OSGeo4W</a> project (which allows Windows users to run a large part of the <a href="http://www.osgeo.org/">OSGeo</a> stack without hassles) and put them up on my site:</p>
<ul>
<li> <a href="http://www.jasonbirch.com/maps/itasca">Itasca Demo</a></li>
<li> <a href="http://www.jasonbirch.com/maps/gmap/">Gmap Demo</a></li>
<li> <a href="http://www.jasonbirch.com/maps/gmap_fusion/">Gmap Fusion Demo</a></li>
</ul>
<p>I did run into some problems that I didn&#8217;t take the time to solve.  I couldn&#8217;t get GEOS to link into MapServer properly, and there were some issues with some of the image formats in GDAL.  I&#8217;m sure that these could have been overcome in time, but it&#8217;s the end of the weekend and I have to get back to real life :)</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2008/04/07/183/mapserver-at-pair-networks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>KML Schema Rides Again</title>
		<link>http://www.jasonbirch.com/nodes/2007/09/08/129/kml-schema-rides-again/</link>
		<comments>http://www.jasonbirch.com/nodes/2007/09/08/129/kml-schema-rides-again/#comments</comments>
		<pubDate>Sat, 08 Sep 2007 09:23:00 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[Formats]]></category>
		<category><![CDATA[Google Earth]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/2007/09/08/129/kml-schema-rides-again/</guid>
		<description><![CDATA[I just read the news about the new ExtendedData tag in KML 2.2. With one mighty stroke of the pen, Google has saved the Schema tag, and my sanity along with it! What does it mean? Basically: KML can still act as a self-contained data exchange format, while getting rid of the nasty part of [...]]]></description>
			<content:encoded><![CDATA[<p>I just <a href="http://google-latlong.blogspot.com/2007/09/kml-22.html">read the news</a> about the new <a href="http://code.google.com/apis/kml/documentation/extendeddata.html">ExtendedData</a> tag in KML 2.2.  With one mighty stroke of the pen, Google has saved the Schema tag, and my sanity along with it!</p>
<p>What does it mean?  Basically:  KML can still act as a self-contained data exchange format, while getting rid of the nasty part of the original &lt;Schema&gt; tag that defined new elements on the fly.</p>
<p>To illustrate the changes, I&#8217;ll take you through my <a href="http://www.jasonbirch.com/nodes/2007/06/29/101/i-heart-kml-schema/">previous example</a> of Sammy G Newt.  Here he is in glorious colour under the new ExtendedData system:</p>
<p><a href="http://www.jasonbirch.com/files/newt_content.kml"><img id="image128" alt="Sammy in the sky with diamonds..." src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/sammyridesagain.png" /></a></p>
<p>The first part of this new system is defining the schema; you can see how to do this here:</p>
<p><code></p>
<p>&nbsp;&nbsp;&lt;Schema name="newt" id="newt_schema"&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleField name="id" type="int"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;displayName&gt;&lt;![CDATA[&lt;b&gt;ID&lt;/b&gt;:]]&gt;&lt;/displayName&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/SimpleField&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleField name="breed" type="string"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;displayName&gt;&lt;![CDATA[&lt;b&gt;Breed&lt;/b&gt;:]]&gt;&lt;/displayName&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/SimpleField&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleField name="slime_factor" type="double"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;displayName&gt;&lt;![CDATA[&lt;b&gt;Slime Factor&lt;/b&gt;:]]&gt;&lt;/displayName&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/SimpleField&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleField name="tail_length" type="int"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;displayName&gt;&lt;![CDATA[&lt;b&gt;Tail Length&lt;/b&gt;:]]&gt;&lt;/displayName&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/SimpleField&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleField name="relative_id" type="string" /&gt;<br />
&nbsp;&nbsp;&lt;/Schema&gt;</p>
<p></code></p>
<p>Looks pretty basic, right?  Not much has changed in the Schema tag, except that has name and id attributes, and there is now an optional displayName element for each field.</p>
<p>OK, now that you&#8217;ve got the schema, you want to create a BalloonStyle that takes advantage of that schema.  Here&#8217;s mine:</p>
<p><code></p>
<p>&nbsp;&nbsp;&nbsp;&lt;BalloonStyle&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor&gt;ffffaa90&lt;/bgColor&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;textColor&gt;ffffffff&lt;/textColor&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;text&gt;&lt;![CDATA[<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;$[name]&lt;/h1&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;table&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;$[newt/breed/displayName]&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;$[newt/breed]&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;$[newt/tail_length/displayName]&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;$[newt/tail_length]&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;$[newt/slime_factor/displayName]&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;$[newt/slime_factor]&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td colspan="2"&gt;&lt;img src="http://www.jasonbirch.com/files/jason_small.jpg?id=$[newt/id]" /&gt;&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/table&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href="#$[newt/relative_id];balloonFlyto"&gt;Please visit my Sister!&lt;/a&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;]]&gt;&lt;/text&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;/BalloonStyle&gt;</p>
<p></code></p>
<p>Can I hear the ah-ha&#8217;s?</p>
<p>There are a couple neat things here.  First, it&#8217;s pretty obvious that if you want the data, you use the format $[nodeName/fieldName], and if you want the display name you use $[nodeName/fieldName/displayName].  Look close at the &lt;a&gt; tag though&#8230;  I am using an identifier stored in the extended data area to link to a different record in the same KML file, using its ID.  This will be great for &#8220;previous&#8221; and &#8220;next&#8221; applications among other things.  This could just as easily have been used to point to a different Placemark within a remote KML file.</p>
<p>Now that we have a schema and a style, we can create some some content that references these:</p>
<p><code></p>
<p>&nbsp;&nbsp;&lt;Placemark id="sammyg"&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;name&gt;Sammy G&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;styleUrl&gt;#newt_style_boy&lt;/styleUrl&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;ExtendedData&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;SchemaData schemaUrl="#newt_schema"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleData name="id"&gt;36&lt;/SimpleData&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleData name="breed"&gt;Common Orange Slitherer&lt;/SimpleData&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleData name="slime_factor"&gt;7.2&lt;/SimpleData&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleData name="tail_length"&gt;6&lt;/SimpleData&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SimpleData name="relative_id"&gt;phyllisk&lt;/SimpleData&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/SchemaData&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;/ExtendedData&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;Point&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;coordinates&gt;1.75,1.75,0&lt;/coordinates&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;/Point&gt;<br />
&nbsp;&nbsp;&lt;/Placemark&gt;</p>
<p></code></p>
<p>So, what&#8217;s special about this?  Two things.  First, I didn&#8217;t magically create any new KML tags on the fly.  Second, you can see that I am referencing both the style and the schema by URL.  This means that you can either store all of your schema, markup, and code in one file, or you can break them out into as many individual files as you would like.  You can have a look at my completed example here:</p>
<p>One File:</p>
<ul>
<li><a href="http://www.jasonbirch.com/files/newt_combined.kml">Combined KML</a></li>
<li><a href="http://www.jasonbirch.com/files/newt_combined.phps">Combined source</a></li>
</ul>
<p>Three files:</p>
<ul>
<li>Content <a href="http://www.jasonbirch.com/files/newt_content.kml">KML</a>  |  <a href="http://www.jasonbirch.com/files/newt_content.phps">source</a></li>
<li>Schema <a href="http://www.jasonbirch.com/files/newt_schema.kml">KML</a>  |  <a href="http://www.jasonbirch.com/files/newt_schema.phps">source</a></li>
<li>Style <a href="http://www.jasonbirch.com/files/newt_style.kml">KML</a>  |  <a href="http://www.jasonbirch.com/files/newt_style.phps">source</a></li>
</ul>
<p>Anyway, this last-minute addition to KML 2.2 has made me pretty happy.  If you have any questions or comments about it, be sure to chime in on the <a href="http://groups.google.com/group/kml-support-advanced/browse_frm/thread/c762b62b50548ef7/48651bcc2b026d5a#48651bcc2b026d5a">official thread</a>.</p>
<p>-J</p>
<p>P.S.  Another thing that I noticed in perusing the documentation is the ability to use <a href="http://code.google.com/apis/kml/documentation/kml_tags_beta1.html#atomauthor">atom tags to link</a> from a KML entity back to its web representation.  This is important because it adds another vector for Google to use when assigning relevance to KML files in spatial search.  I&#8217;m not an AtomPub expert, but I would imagine that it could also be used to allow a smart client to update features on the fly?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2007/09/08/129/kml-schema-rides-again/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JSON and GeoJSON in FME</title>
		<link>http://www.jasonbirch.com/nodes/2007/09/05/116/json-and-geojson-in-fme/</link>
		<comments>http://www.jasonbirch.com/nodes/2007/09/05/116/json-and-geojson-in-fme/#comments</comments>
		<pubDate>Wed, 05 Sep 2007 09:49:41 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[Data Transformation]]></category>
		<category><![CDATA[FME]]></category>
		<category><![CDATA[Formats]]></category>
		<category><![CDATA[Loose Integration]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/2007/09/05/116/json-and-geojson-in-fme/</guid>
		<description><![CDATA[Many of you know about JSON, an object serialization scheme that has rapidly gained acceptance in AJAX-style applications. What you may not know is that there is an effort to standardise the representation of JSON-ified spatial features, known as GeoJSON. FME is usually quick to support new formats (like KML and GeoRSS) but this time [...]]]></description>
			<content:encoded><![CDATA[<p>Many of you know about <a href="http://www.json.org/">JSON</a>, an object serialization scheme that has rapidly gained acceptance in AJAX-style applications.  What you may not know is that there is an effort to standardise the representation of JSON-ified spatial features, known as <a href="http://wiki.geojson.org/Main_Page">GeoJSON</a>.</p>
<p><a href="http://www.safe.com/">FME</a> is usually quick to support new formats (like KML and GeoRSS) but this time Safe has surpassed themselves, getting early JSON and GeoJSON support into their betas before the GeoJSON specification has reached a release version.  Tonight I took some time out to play with this new support.</p>
<p>The basis of JSON support in FME is provided by two new read/write formats: JSON and GeoJSON.  These new formats are augmented by two new transformers:  JSONExploder and JSONExtractor.  To get started, I&#8217;m going to show you how to extract data from a JSON source I happen to have lying around (it&#8217;s <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=cnolDm_Z2xG6wefdJZhxuA">publicly available</a> at Yahoo Pipes), which looks like this:</p>
<p><img id="image120" alt="JSON Raw" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/json_raw.png" /></p>
<p>When you first import this data source into FME, it is imported with the top level of attributes broken out.  In this case, Pipes returns a top-level object with several attributes (link, description, etc) that you can see in my test workspace below:</p>
<p><img id="image115" alt="JSON Workspace" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/fme_json_processing.png" /></p>
<p>Now, this isn&#8217;t much use, because my features are hidden inside the &#8220;items&#8221; attribute.  In order to get them out, I first need to explode my single object into multiple features.  The new JSONExploder transformer comes to the rescue here:</p>
<p><img id="image117" alt="JSONExploder" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/fme_jsonexploder.png" /></p>
<p>Now, I have a unique feature for each of my feed items, but I really want some of the nested attributes.  In particular, I want the description from the root of the item, and the nested y:location["lat"] and y:location["lon"] attributes.  The JSONExtractor makes it easy to pull these out into new attributes:</p>
<p><img id="image118" alt="JSONExtractor" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/fme_jsonextractor.png" /></p>
<p>And once adding a couple more of these, each of my features has some nice attributes attached to it, which I could then turn into points if I wanted:</p>
<p><img id="image119" alt="JSON Attributes" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/fme_json_attributes.png" /></p>
<p>OK, so that&#8217;s kinda cool from a straight ETL standpoint.  I can take in JSON, mess with it, and then pump it out into whatever format I want.  But the fun stuff is when you start getting into GeoJSON.  Fortunately there are a couple early adopters, <a href="http://crschmidt.net/">Christopher Schmidt</a> and <a href="http://hobu.biz/the_pitch">Howard Butler</a>, who gave me some feeds to play around with.  The first of these comes from Christopher&#8217;s super-flexible <a href="http://www.featureserver.org/">FeatureServer</a> application (check it out, it&#8217;s open source):</p>
<p><a href="http://www.featureserver.org/demo.html"><img id="image121" alt="FeatureServer Demo in OpenLayers" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/fs_ol_demo.png" border="0" /></a></p>
<p>The features displayed on this <a href="http://www.openlayers.org/">OpenLayers</a> map can be easily downloaded from FeatureServer in GeoJSON format (or KML, or GeoRSS, or whatever).  The URL for the GeoJSON representation is:</p>
<p>http://featureserver.org/featureserver.cgi/scribble?format=geojson</p>
<p>Pulling this into FME is as simple as creating a new FME data source, and specifying the URL:</p>
<p><img id="image122" alt="Add GeoJSON" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/fme_add_geojson.png" /></p>
<p>As you can see, you can then treat this data like any other spatial data source:</p>
<p><img id="image123" alt="GeoJSON Visualizer" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/geojson_fs_vis.png" /></p>
<p>Now, for a final example&#8230;  Howard has a GeoJSON resource collection of counties in Iowa, accessible in a pattern something like this:</p>
<p>http://geoservices.hobu.biz/political/json/johnson</p>
<p>Now we could take this feature, in its source projection of UTM Zone 15N NAD83, but Howard&#8217;s put together a really nifty (non-commercial use only, unless you want to pay Howard some $$$) JSON-based web processing projection service.  Not only that, but he&#8217;s also made it smart enough to interpret projections referenced locally, but also from the oh-so-cool (and built as a collaborative effort between Christopher and Howard) <a href="http://www.spatialreference.org/">SpatialReference.org</a>.  So, all you need to do is feed it the URL of your source data, the url of your source CRS (<a href="http://spatialreference.org/ref/epsg/26915/">http://spatialreference.org/ref/epsg/26915/</a>) and the url of your destination CRS (<a href="http://spatialreference.org/ref/epsg/4326/">http://spatialreference.org/ref/epsg/4326/</a>).  Like so:</p>
<p>http://geoservices.hobu.biz/project/?url=%22http://geoservices.hobu.biz/political/json/johnson%22&#038;inref=http://spatialreference.org/ref/epsg/26915/proj4/&#038;outref=http://spatialreference.org/ref/epsg/4326/proj4/</p>
<p>And, as just another link in the dynamic web chain, FME can read this transformed JSON feature:</p>
<p><img id="image124" alt="HoBu GeoJSON Example" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/09/geojson_hobu_vis.png" /></p>
<p>Now, for desktop FME users, this gives us &#8220;Pipes on Steroids&#8221;: all the mashup flexibility of Yahoo Pipes, with the huge format support and rich processing model of FME.  As cool as this is, I think the real power will be seen whenever Safe integrates this functionality into their Server product.  It will allow them to play well on both the &#8220;enterprise&#8221; traditional GML/WFS/etc level and on the neogeography JSON/GeoRSS/KML mashup level with a single product from a single (or multiple if you want) data source.  For organisations that want turn-key interoperability solutions, <a href="http://www.fmepedia.com/index.php/What_is_FME_Server">FME Server</a> is going to rock your world.</p>
<p>-J</p>
<p>P.S.  I&#8217;m thinking about getting a personalized plate that says GEO JSN :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2007/09/05/116/json-and-geojson-in-fme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GeoRSS:  FME Rocks My World Again</title>
		<link>http://www.jasonbirch.com/nodes/2007/03/26/73/georss-fme-rocks-my-world-again/</link>
		<comments>http://www.jasonbirch.com/nodes/2007/03/26/73/georss-fme-rocks-my-world-again/#comments</comments>
		<pubDate>Mon, 26 Mar 2007 08:16:00 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[FME]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[GeoRSS]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/2007/03/26/73/georss-fme-rocks-my-world-again/</guid>
		<description><![CDATA[There&#8217;s a simple indicator I use to tell when I&#8217;m too busy at work; it&#8217;s called the FME scale. Any time it takes me over a month to play with a new feature in Safe Software&#8216;s FME, I&#8217;m swamped :) In this case, it was particularly painful. I&#8217;m really interested in GeoRSS because I see [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a simple indicator I use to tell when I&#8217;m too busy at work; it&#8217;s called the FME scale.  Any time it takes me over a month to play with a new feature in <a href="http://www.safe.com/">Safe Software</a>&#8216;s FME, I&#8217;m swamped :)</p>
<p>In this case, it was particularly painful.  I&#8217;m really interested in <a href="http://www.georss.org/">GeoRSS</a> because I see the potential that it has for increasing the level of information my municipality can deliver to its residents.  For instance, we could offer insight into current housing starts with a feed of new construction building permits.</p>
<p>For me, the beauty of GeoRSS is that it has value even without the maps.  With a single format, I can publish information that our residents can view in their favourite feed reader, while allowing more sophisticated users to benefit from the spatial information.  </p>
<p>As you can see from the following screenshots of a GeoRSS file displayed in <a href="http://www.google.com/reader/">Google Reader</a> and <a href="http://maps.google.com/">Google Maps</a>, I&#8217;ve finally found a little time to play around with the <a href="http://www.safe.com/georss">GeoRSS support in FME</a>.  You can click on the second image to see how it works.  Keep in mind that the data is static, and not guaranteed to be accurate for any use:</p>
<p><img id="image72" alt="Example of GeoRSS feed in feed reading software" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/03/fme_georss_feedreader.png" /></p>
<p><a href="http://maps.google.com/maps?f=q&#038;q=http://earth.nanaimo.ca/files/test.xml&#038;z=18&#038;ll=49.153724,-123.941204&#038;spn=0.001365,0.003047&#038;t=h&#038;om=0&#038;mid=1174889429"><img id="image71" alt="GeoRSS for Nanaimo Building Permits generated by Safe Software FME" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/03/safe_software_georss_nanaim.png" /></a></p>
<p>Until now, much of the GeoRSS that I&#8217;ve had a chance to look at has been point-based, so it&#8217;s nice to have a way of generating some more complex elements in <a href="http://georss.org/simple.html">Simple</a> and <a href="http://georss.org/gml.html">GML</a> varieties and, now that <a href="http://googlemapsapi.blogspot.com/2007/03/kml-and-georss-support-added-to-google.html">Google Maps supports GeoRSS</a>, an easy way to visualise it.</p>
<p>So anyway, how did I generate this GeoRSS file?  It was pretty easy, and I&#8217;ll take you through the steps.</p>
<p>First, I had to set some basic parameters for the feed in FME.  This image shows the basic workflow, from create a single feature with no geometry, through to writing the feature out to the &#8220;Feed&#8221; output:</p>
<p><img id="image74" alt="FME workflow for setting feed-specific attributes." src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/03/georss_feed_attributes.png" /></p>
<p>Inside of the AttributeCreator, I&#8217;m setting some basic values for the feed as a whole:</p>
<p><img id="image75" alt="FME AttributeCreator used to set GeoRSS feed properties" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/03/georss_attributecreator.png" /></p>
<p>Pretty simple, eh?</p>
<p>Next, I pull in some data from our property records database, and merge it with an Oracle Locator spatial table which holds the City&#8217;s parcel base:</p>
<p><img id="image76" alt="Merge spatial and attribute data" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/03/georss_merge_data.png" /></p>
<p>And finally, I set the same the entry-specific GeoRSS parameters, this time using attributes of the building permit records instead of static text to fill in the blanks:</p>
<p><img id="image77" alt="Populating GeoRSS entry attributes using FME" src="http://www.jasonbirch.com/nodes/wp-content/uploads/2007/03/georss_entry_attributes.png" /></p>
<p>And that&#8217;s all she wrote.  I still have to find time to fine-tune some of the attributes (such as dates and link), get some approvals, and work out the logistics of getting the data out to our external server nightly.  It sure is nice that the technical part is so easy though.</p>
<p>If you deal with spatial data on a regular basis and haven&#8217;t evaluated FME, you&#8217;re doing yourself a disservice.  Pick up the <a href="http://www.safe.com/beta">latest beta</a> from their site (for GeoRSS support), request an evaluation license, and play around a bit.  Everyone&#8217;s usage pattern is different, but I was able to justify the cost of my initial license and training with the time it saved over about six months.  Safe Software deserves a lot of credit.  Apart from the usefulness of FME, their support is incredible.  They are the only company that I have ever dealt with where I felt I was getting real value from the software maintenance plan.  </p>
<p>And, in case you&#8217;re wondering, they didn&#8217;t buy me a nice laptop or a 3D mouse to use while writing this.  I&#8217;m just a satisfied customer :)</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2007/03/26/73/georss-fme-rocks-my-world-again/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Build MapGuide Open Source from SVN</title>
		<link>http://www.jasonbirch.com/nodes/2006/11/10/46/build-mapguide-open-source-from-svn/</link>
		<comments>http://www.jasonbirch.com/nodes/2006/11/10/46/build-mapguide-open-source-from-svn/#comments</comments>
		<pubDate>Fri, 10 Nov 2006 07:21:37 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[MapGuide]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/2006/11/10/46/build-mapguide-open-source-from-svn/</guid>
		<description><![CDATA[I guess Chris has prodded me enough times now that I actually have to make good on my promise. Also, Tom&#8217;s work on the FC4 version got me motivated. I&#8217;ve place a very draft version of some some instructions for downloading and building MapGuide Open Source from the SVN code repository here: http://wiki.osgeo.org/index.php/Building_MapGuide_on_Windows It worked [...]]]></description>
			<content:encoded><![CDATA[<p>I guess Chris has <a href="http://chris.narx.net/2006/10/15/mapguide-102-released/">prodded</a> me <a href="http://www.nabble.com/Various-feature-enhancements-for-WMS-WFS-p7192368.html">enough</a> times now that I actually have to make good on my <a href="http://www.jasonbirch.com/nodes/2006/10/18/42/mapguide-open-source-off-to-the-races/">promise</a>.   Also, <a href="http://www.nabble.com/RE%3A-MySQL-FDO-and-Fedora-4-p7262400.html">Tom&#8217;s</a> work on the <a href="http://wiki.osgeo.org/index.php/Building_MapGuide_on_Fedora_Core_4">FC4 version</a> got me motivated.</p>
<p>I&#8217;ve place a very draft version of some some instructions for downloading and building MapGuide Open Source from the SVN code repository here:</p>
<p><a href="http://wiki.osgeo.org/index.php/Building_MapGuide_on_Windows">http://wiki.osgeo.org/index.php/Building_MapGuide_on_Windows</a></p>
<p>It worked for me (to the best of my recollection) and it may work for you also.  If you try it and run into problems, spot something that is missing, or find something unclear, please hack up the wiki so that those following in your footsteps don&#8217;t hit the same issues.</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2006/11/10/46/build-mapguide-open-source-from-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
