<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in Pragmatic GIS | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/9/posts</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>mapmap.org? posted by Don Albertson @ Wed, 30 Apr 2008 12:58:52 -0000</title>
      <description>&lt;p&gt;Whatever is going on, the site responds but the page never loads.  Tried 3 different browsers on 3 different PC&amp;#8217;s in 2 different locations and got the same result.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Apr 2008 12:58:52 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:121:2684</guid>
      <author>Don Albertson</author>
      <link>http://forums.pragprog.com/forums/9/topics/121</link>
    </item>
    <item>
      <title>arcexplorer posted by Don Albertson @ Wed, 30 Apr 2008 12:56:38 -0000</title>
      <description>&lt;p&gt;&lt;span class="caps"&gt;ESRI&lt;/span&gt; provides the Java version in different formats for different OS&amp;#8217;s.  The &lt;span class="caps"&gt;ZIP&lt;/span&gt; for Windows contains a Windows installer that puts the jars etc in a place and creates a shortcut that uses your installed &lt;span class="caps"&gt;JVM&lt;/span&gt;.  I&amp;#8217;m guessing that the versions for Linux contain the same jars but are installed via rpm or other appropriate technology for that.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Apr 2008 12:56:38 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:151:2683</guid>
      <author>Don Albertson</author>
      <link>http://forums.pragprog.com/forums/9/topics/151</link>
    </item>
    <item>
      <title>mapmap.org? posted by charles reese @ Wed, 09 Apr 2008 19:21:35 -0000</title>
      <description>&lt;p&gt;To repeat previous concerns, can the author please help the purchasers of the book resolve these outstanding issues with links throughout the book??&lt;/p&gt;</description>
      <pubDate>Wed, 09 Apr 2008 19:21:35 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:121:2568</guid>
      <author>charles reese</author>
      <link>http://forums.pragprog.com/forums/9/topics/121</link>
    </item>
    <item>
      <title>Confused Book User posted by charles reese @ Wed, 09 Apr 2008 19:17:59 -0000</title>
      <description>&lt;p&gt;Overall, it is a unique book but not nearly comprehensive enough and needs consistent updating to still be relevant. Please update.&lt;/p&gt;


	&lt;p&gt;Hmmm I&amp;#8217;m on &lt;span class="caps"&gt;CH 8&lt;/span&gt; with many struggles in-between Links and instructions to obtaining files are incomplete. 8.1 Mapbuilder section states  &#8220;take a look at GeoServer 1.6.0\webapps\geoserver\preview&#8230;.this is an empty folder on my drive?&lt;/p&gt;</description>
      <pubDate>Wed, 09 Apr 2008 19:17:59 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:359:2567</guid>
      <author>charles reese</author>
      <link>http://forums.pragprog.com/forums/9/topics/359</link>
    </item>
    <item>
      <title>shp2pgsql troubles posted by Stephen McKenna @ Fri, 04 Apr 2008 16:26:37 -0000</title>
      <description>&lt;p&gt;I also had to copy the lib and reboot using Vista. Does anyone know how to get the example on page 112 (GeomUnion of the_geom from us_states into us_50) without getting the mixed &lt;span class="caps"&gt;SRID&lt;/span&gt; geometries error?&lt;/p&gt;</description>
      <pubDate>Fri, 04 Apr 2008 16:26:37 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:245:2545</guid>
      <author>Stephen McKenna</author>
      <link>http://forums.pragprog.com/forums/9/topics/245</link>
    </item>
    <item>
      <title>Groovy Geocoding Script pg 222 - where do new blocks of code go? posted by lcp @ Mon, 31 Mar 2008 23:37:00 -0000</title>
      <description>&lt;p&gt;Thanks very much, I&amp;#8217;ll write to Scott Davis, the author, and see if he has the code or could post it here.&lt;/p&gt;


	&lt;p&gt;Lela&lt;/p&gt;</description>
      <pubDate>Mon, 31 Mar 2008 23:37:00 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:335:2519</guid>
      <author>lcp</author>
      <link>http://forums.pragprog.com/forums/9/topics/335</link>
    </item>
    <item>
      <title>Groovy Geocoding Script pg 222 - where do new blocks of code go? posted by Greg Cermak @ Wed, 26 Mar 2008 18:12:32 -0000</title>
      <description>&lt;p&gt;In chapter 9: Geocoding your data of &amp;#8216;GIS for Web Developers&amp;#8217; the source for the following methods which should be in class Addr are missing&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;noQuote()&lt;/li&gt;
		&lt;li&gt;toSQL()&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;This chapter was poorly editted. Also there are no source code listings available to check for download.&lt;/p&gt;


	&lt;p&gt;Thanks&lt;/p&gt;


	&lt;p&gt;Greg Cermak&lt;/p&gt;</description>
      <pubDate>Wed, 26 Mar 2008 18:12:32 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:335:2493</guid>
      <author>Greg Cermak</author>
      <link>http://forums.pragprog.com/forums/9/topics/335</link>
    </item>
    <item>
      <title>Groovy Geocoding Script pg 222 - where do new blocks of code go? posted by lcp @ Tue, 25 Mar 2008 00:11:24 -0000</title>
      <description>&lt;p&gt;I hope that someone can help me with the Groovy script presented in&lt;br /&gt;the &amp;#8220;Geocoding Your Data&amp;#8221; section. I was able to use the first part&lt;br /&gt;successfully to load comma-delimited data into my postgress database, but&lt;br /&gt;I&amp;#8217;m having trouble with the instructions on building in the geocoder.&lt;/p&gt;


	&lt;p&gt;I have attached my code below &amp;#8211; I have worked up to the point&lt;br /&gt;just before 9.3 &amp;#8220;Adding PostGIS fields&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;Currently, I get the error:&lt;br /&gt;startup failed, notworking_fixer.groovy: 100: unexpected token: } @&lt;br /&gt;line 100, column 1.&lt;br /&gt;1 error&lt;/p&gt;


	&lt;p&gt;I think I am misunderstanding where to put the blocks of code within&lt;br /&gt;my script after adding the expanded ddl statement.&lt;br /&gt;I&amp;#8217;m not sure if class Addr and public Addr go right after the ddl&lt;br /&gt;statement. Then, I&amp;#8217;m not sure what  } ... }  means written in the book&lt;br /&gt;after the public Addr statement. Also I don&amp;#8217;t know if I have the&lt;br /&gt;geocode method or the Fixer statement in the right places.&lt;/p&gt;


	&lt;p&gt;Any help is much appreciated!&lt;/p&gt;


	&lt;p&gt;Lela&lt;/p&gt;


	&lt;p&gt;Groovy Script Pg 222&lt;/p&gt;


	&lt;p&gt;outputFile = new File(&amp;#8220;college.sql&amp;#8221;) &lt;br /&gt;if(outputFile.exists()){ outputFile.delete() } &lt;br /&gt;ddl = &amp;#8221;&amp;#8221;&amp;#8221; &lt;br /&gt;&lt;span class="caps"&gt;BEGIN&lt;/span&gt;; &lt;br /&gt;&lt;span class="caps"&gt;CREATE TABLE&lt;/span&gt; college ( &lt;br /&gt;&amp;#8220;id&amp;#8221; numeric &lt;span class="caps"&gt;PRIMARY KEY&lt;/span&gt;, &lt;br /&gt;&amp;#8220;name&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;address&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;city&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;state&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;zip&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;lat&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;lon&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;address_n&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;city_n&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;state_n&amp;#8221; varchar(255), &lt;br /&gt;&amp;#8220;zip_n&amp;#8221; varchar(255)); &lt;br /&gt;&amp;#8221;&amp;#8221;&amp;#8220;&lt;/p&gt;


	&lt;p&gt;class Addr{ &lt;br /&gt;String id &lt;br /&gt;String name &lt;br /&gt;String address &lt;br /&gt;String city &lt;br /&gt;String state &lt;br /&gt;String zip &lt;br /&gt;String lat &lt;br /&gt;String lon &lt;br /&gt;String addressNormalized &lt;br /&gt;String cityNormalized &lt;br /&gt;String stateNormalized &lt;br /&gt;String zipNormalized&lt;/p&gt;


	&lt;p&gt;public Addr(String[] tokens){ &lt;br /&gt;id = tokens&lt;sup&gt;&lt;a href="#fn0"&gt;0&lt;/a&gt;&lt;/sup&gt;.noQuote() &lt;br /&gt;name = tokens&lt;sup&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt;.noQuote() &lt;br /&gt;address = tokens&lt;sup&gt;&lt;a href="#fn2"&gt;2&lt;/a&gt;&lt;/sup&gt;.noQuote() &lt;br /&gt;city = tokens&lt;sup&gt;&lt;a href="#fn3"&gt;3&lt;/a&gt;&lt;/sup&gt;.noQuote() &lt;br /&gt;state = tokens&lt;sup&gt;&lt;a href="#fn4"&gt;4&lt;/a&gt;&lt;/sup&gt;.noQuote() &lt;br /&gt;zip = tokens&lt;sup&gt;&lt;a href="#fn5"&gt;5&lt;/a&gt;&lt;/sup&gt;.noQuote()&lt;/p&gt;


	&lt;p&gt;}}&lt;/p&gt;


	&lt;p&gt;public boolean geocode(){ &lt;br /&gt;def urlStart = &amp;#8220;http://rpc.geocoder.us/service/csv?address=&amp;#8221; &lt;br /&gt;def urlBody = &amp;#8221;${address},${city},${state},${zip}&amp;#8221; &lt;br /&gt;def urlEncoded = urlStart + URLEncoder.encode(urlBody, &amp;#8220;UTF-8&amp;#8221;) &lt;br /&gt;new &lt;acronym title="urlEncoded"&gt;URL&lt;/acronym&gt;.eachLine{ line -&amp;gt; &lt;br /&gt;println &amp;#8221;\t${line}&amp;#8221; &lt;br /&gt;if(line.startsWith(&amp;#8220;2&amp;#8221;)){ &lt;br /&gt;addressNormalized = &amp;#8220;NOT &lt;span class="caps"&gt;FOUND&lt;/span&gt;&amp;#8221; &lt;br /&gt;} &lt;br /&gt;else{ &lt;br /&gt;def tokens = line.getNext(6) &lt;br /&gt;lat = tokens&lt;sup&gt;&lt;a href="#fn0"&gt;0&lt;/a&gt;&lt;/sup&gt; &lt;br /&gt;lon = tokens&lt;sup&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt; &lt;br /&gt;addressNormalized = tokens&lt;sup&gt;&lt;a href="#fn2"&gt;2&lt;/a&gt;&lt;/sup&gt;.fixQuote() &lt;br /&gt;cityNormalized = tokens&lt;sup&gt;&lt;a href="#fn3"&gt;3&lt;/a&gt;&lt;/sup&gt;.fixQuote() &lt;br /&gt;stateNormalized = tokens&lt;sup&gt;&lt;a href="#fn4"&gt;4&lt;/a&gt;&lt;/sup&gt;.fixQuote() &lt;br /&gt;zipNormalized = tokens&lt;sup&gt;&lt;a href="#fn5"&gt;5&lt;/a&gt;&lt;/sup&gt;.fixQuote() &lt;br /&gt;} &lt;br /&gt;} &lt;br /&gt;return addressNormalized != &amp;#8220;NOT &lt;span class="caps"&gt;FOUND&lt;/span&gt;&amp;#8221; &lt;br /&gt;}&lt;/p&gt;


	&lt;p&gt;outputFile.append(ddl) &lt;br /&gt;// new code &lt;br /&gt;// ED: how do I make this bold? &lt;br /&gt;insertStart = &amp;#8221;&amp;#8221;&amp;#8220;insert into college (&amp;#8220;id&amp;#8221;, &amp;#8220;name&amp;#8221;, &amp;#8220;address&amp;#8221;, &lt;br /&gt;&amp;#8220;city&amp;#8221;, &amp;#8220;state&amp;#8221;, &amp;#8220;zip&amp;#8221;, &amp;#8220;lat&amp;#8221;, &amp;#8220;lon&amp;#8221;, &amp;#8220;address_n&amp;#8221;, &amp;#8220;city_n&amp;#8221;, &amp;#8220;state_n&amp;#8221;, &amp;#8220;zip_n&amp;#8221;) values(&amp;#8221;&amp;#8221;&amp;#8221; &lt;br /&gt;insertEnd = &amp;#8220;);&amp;#8221; &lt;br /&gt;counter = 0 &lt;br /&gt;inputFile = new File(&amp;#8220;sample.csv&amp;#8221;)&lt;/p&gt;


	&lt;p&gt;use(Fixer){ &lt;br /&gt;inputFile.eachLine{ line -&amp;gt; &lt;br /&gt;String[] tokens = line.getNext(6) &lt;br /&gt;if(counter == 0) { &lt;br /&gt;/* skip the headers */ &lt;br /&gt;counter++ &lt;br /&gt;} &lt;br /&gt;else{ &lt;br /&gt;println &amp;#8221;${counter+&lt;ins&gt;} ${tokens&lt;sup&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt;.fixQuote()}&amp;#8221; //show what&amp;#8217;s going on &lt;br /&gt;addr = new Addr(tokens) &lt;br /&gt;addr.geocode() ? found&lt;/ins&gt;+ : notFound++&lt;br /&gt;insertMiddle = &amp;#8221;&amp;#8221; &lt;br /&gt;for(i in 0..5){ &lt;br /&gt;insertMiddle += &amp;#8221;${tokens[i].fixQuote()},&amp;#8221; &lt;br /&gt;} &lt;br /&gt;insertMiddle += addr.toSql() &lt;br /&gt;//insertMiddle = insertMiddle[0..-2] //strip off trailing comma &lt;br /&gt;outputFile.append(&amp;#8221;${insertStart}${insertMiddle}${insertEnd}\n&amp;#8221;)&lt;/p&gt;


	&lt;p&gt;//write out current status &lt;br /&gt;statusFile = new File(&amp;#8220;status.txt&amp;#8221;) &lt;br /&gt;statusFile.append(new Status(counter, found, notFound).toString()&lt;br /&gt;} &lt;br /&gt;} &lt;br /&gt;}&lt;/p&gt;


	&lt;p&gt;outputFile.append(&amp;#8220;END;&amp;#8221;)&lt;/p&gt;


	&lt;p&gt;class Fixer{ &lt;br /&gt;static String fixQuote(String self){&lt;br /&gt;self = self&lt;sup&gt;&lt;a href="#fn0"&gt;0&lt;/a&gt;&lt;/sup&gt; + self[1..-2].replaceAll(&amp;#8221;\&amp;#8217;&amp;#8221;, &amp;#8221;\&amp;#8217;\&amp;#8217;&amp;#8221;) + self[-1] &lt;br /&gt;if(self.startsWith(&amp;#8221;\&amp;#8221;&amp;#8220;)){ &lt;br /&gt;return &amp;#8221;&amp;#8217;&amp;#8221; + self[1..-2] + &amp;#8221;&amp;#8217;&amp;#8221; &lt;br /&gt;} &lt;br /&gt;else{ &lt;br /&gt;return self &lt;br /&gt;} &lt;br /&gt;}&lt;/p&gt;


	&lt;p&gt;static String[] getNext(String self, int numberOf){ &lt;br /&gt;def list = [] &lt;br /&gt;def st = new StringTokenizer(self, &amp;#8221;,&amp;#8221;) &lt;br /&gt;numberOf.times{ &lt;br /&gt;def thisToken = st.nextToken() &lt;br /&gt;while(thisToken.startsWith(&amp;#8221;\&amp;#8221;&amp;#8220;) &amp;#38;&amp;#38; !thisToken.endsWith(&amp;#8221;\&amp;#8221;&amp;#8220;) ){ &lt;br /&gt;thisToken += &amp;#8221;,&amp;#8221; + st.nextToken() &lt;br /&gt;} &lt;br /&gt;list &amp;lt;&amp;lt; thisToken &lt;br /&gt;} &lt;br /&gt;return list &lt;br /&gt;} &lt;br /&gt;}&lt;/p&gt;</description>
      <pubDate>Tue, 25 Mar 2008 00:11:24 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:335:2486</guid>
      <author>lcp</author>
      <link>http://forums.pragprog.com/forums/9/topics/335</link>
    </item>
    <item>
      <title>Manipulating Data: us_states to us_50 posted by Bill Parrill @ Sun, 23 Mar 2008 08:41:17 -0000</title>
      <description>&lt;p&gt;I&amp;#8217;m on chapter 5.9 and have reached the point where I&amp;#8217;m supposed to create the multipolygons.  However, when I run the select statement, I get an error:&lt;/p&gt;


	&lt;p&gt;g4wd=# select name, GeomUnion(the_geom) as location into us_50 from us_states group by name;
&lt;strong&gt;&lt;span class="caps"&gt;ERROR&lt;/span&gt;:  Operation on mixed &lt;span class="caps"&gt;SRID&lt;/span&gt; geometries&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Any ideas what&amp;#8217;s going on?  Thanks!  I&amp;#8217;m using PostgreSQL 8.3.1.&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 08:41:17 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:331:2478</guid>
      <author>Bill Parrill</author>
      <link>http://forums.pragprog.com/forums/9/topics/331</link>
    </item>
    <item>
      <title>shp2pgsql troubles posted by Bill Parrill @ Sun, 23 Mar 2008 08:34:56 -0000</title>
      <description>&lt;p&gt;I had a similar problem using the Windows compiled version.  I had to copy libiconv2.dll to libiconv-2.dll in order for it to work properly.&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 08:34:56 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:245:2477</guid>
      <author>Bill Parrill</author>
      <link>http://forums.pragprog.com/forums/9/topics/245</link>
    </item>
    <item>
      <title>shp2pgsql troubles posted by Glenn Goodrich @ Sun, 09 Mar 2008 03:05:17 -0000</title>
      <description>&lt;p&gt;What&amp;#8217;s your OS?&lt;/p&gt;</description>
      <pubDate>Sun, 09 Mar 2008 03:05:17 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:245:2409</guid>
      <author>Glenn Goodrich</author>
      <link>http://forums.pragprog.com/forums/9/topics/245</link>
    </item>
    <item>
      <title>shp2pgsql troubles posted by Anthony Marca @ Thu, 31 Jan 2008 04:35:30 -0000</title>
      <description>&lt;p&gt;I am working through chapter 5 &amp;#8211; Spatial Databases.  I am trying to import a shapefile using the shp2pgsql utility, but i am not sure where I have to execute this command.  I am inputting the syntax exactly as its written but nothing seems to be happening.  Has anyone out there tried using the shp2pgsql tool?  I could use some help.  Thanks much!&lt;/p&gt;</description>
      <pubDate>Thu, 31 Jan 2008 04:35:30 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:245:2246</guid>
      <author>Anthony Marca</author>
      <link>http://forums.pragprog.com/forums/9/topics/245</link>
    </item>
    <item>
      <title>arcexplorer posted by Steven Scherbinski @ Fri, 23 Nov 2007 13:16:29 -0000</title>
      <description>&lt;p&gt;It appears that the ersi arcexplorer has changed to arcgisexplorer.  It also seems to be only available in a windows executable.  Is there a spot to get the Java only app?  Legally?&lt;/p&gt;</description>
      <pubDate>Fri, 23 Nov 2007 13:16:29 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:151:1965</guid>
      <author>Steven Scherbinski</author>
      <link>http://forums.pragprog.com/forums/9/topics/151</link>
    </item>
    <item>
      <title>mapmap.org? posted by Steven Scherbinski @ Fri, 23 Nov 2007 13:13:33 -0000</title>
      <description>&lt;p&gt;You need to use &lt;a href="http://www.mapmap.org"&gt;www.mapmap.org&lt;/a&gt;.  Though frankly there isn&amp;#8217;t much there.&lt;/p&gt;</description>
      <pubDate>Fri, 23 Nov 2007 13:13:33 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:121:1964</guid>
      <author>Steven Scherbinski</author>
      <link>http://forums.pragprog.com/forums/9/topics/121</link>
    </item>
    <item>
      <title>mapmap.org? posted by Bo Gusman @ Sat, 27 Oct 2007 01:26:05 -0000</title>
      <description>&lt;p&gt;That&amp;#8217;s the site listed in the book. A blank page shows. Is that an error or is the site down?&lt;/p&gt;</description>
      <pubDate>Sat, 27 Oct 2007 01:26:05 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:9:121:1883</guid>
      <author>Bo Gusman</author>
      <link>http://forums.pragprog.com/forums/9/topics/121</link>
    </item>
  </channel>
</rss>
