<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Daniel Azuma</title>
	<atom:link href="http://www.daniel-azuma.com/blog/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.daniel-azuma.com/blog</link>
	<description>Theology and software development</description>
	<lastBuildDate>Sat, 11 Feb 2012 07:44:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Geo-Rails part 8: ZCTA Lookup, A Worked Example by Jeremy</title>
		<link>http://www.daniel-azuma.com/blog/archives/191#comment-978</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Sat, 11 Feb 2012 07:44:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=191#comment-978</guid>
		<description>Great series. The effort to bring a strong geo library to the rails community is much needed and appreciated.

After following your series I have all my zipcode data loaded and read to go. Now I just need to know how to draw the polygons to a map. So my vote is for a visualization tools series.

Thanks.</description>
		<content:encoded><![CDATA[<p>Great series. The effort to bring a strong geo library to the rails community is much needed and appreciated.</p>
<p>After following your series I have all my zipcode data loaded and read to go. Now I just need to know how to draw the polygons to a map. So my vote is for a visualization tools series.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Setting the Database Free with ActiveRecord&#8217;s Connection API by Daniel Azuma</title>
		<link>http://www.daniel-azuma.com/blog/archives/216#comment-713</link>
		<dc:creator>Daniel Azuma</dc:creator>
		<pubDate>Fri, 27 Jan 2012 23:12:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=216#comment-713</guid>
		<description>Kim,

You&#039;re right in that I&#039;ve kind of glossed over the security issues in this article. I&#039;m assuming that, generally, you may not trust the *data* that you&#039;re injecting, but at least you&#039;re trusting the *Ruby objects* (i.e. their types, to_s behavior, etc.), since chances are the objects themselves are being created by you, or at least by Rails. In that case, correct me if I&#039;m wrong, but I believe quoting should be sufficient. If the objects are being handed to you by an untrusted source, then yes, you&#039;ll need to sanitize them before indiscriminately creating custom SQL.

Using prepared statements really isn&#039;t a panacea for this, as far as I know. I believe you can still create a malicious object that will bypass quoting and allow SQL injection. Once you can modify code, all bets are off.

Daniel</description>
		<content:encoded><![CDATA[<p>Kim,</p>
<p>You&#8217;re right in that I&#8217;ve kind of glossed over the security issues in this article. I&#8217;m assuming that, generally, you may not trust the *data* that you&#8217;re injecting, but at least you&#8217;re trusting the *Ruby objects* (i.e. their types, to_s behavior, etc.), since chances are the objects themselves are being created by you, or at least by Rails. In that case, correct me if I&#8217;m wrong, but I believe quoting should be sufficient. If the objects are being handed to you by an untrusted source, then yes, you&#8217;ll need to sanitize them before indiscriminately creating custom SQL.</p>
<p>Using prepared statements really isn&#8217;t a panacea for this, as far as I know. I believe you can still create a malicious object that will bypass quoting and allow SQL injection. Once you can modify code, all bets are off.</p>
<p>Daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Geo-Rails part 8: ZCTA Lookup, A Worked Example by Csaba N</title>
		<link>http://www.daniel-azuma.com/blog/archives/191#comment-703</link>
		<dc:creator>Csaba N</dc:creator>
		<pubDate>Thu, 26 Jan 2012 23:08:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=191#comment-703</guid>
		<description>Thanks Daniel! 

That little change did the trick. :)</description>
		<content:encoded><![CDATA[<p>Thanks Daniel! </p>
<p>That little change did the trick. <img src='http://www.daniel-azuma.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Setting the Database Free with ActiveRecord&#8217;s Connection API by Kim</title>
		<link>http://www.daniel-azuma.com/blog/archives/216#comment-698</link>
		<dc:creator>Kim</dc:creator>
		<pubDate>Thu, 26 Jan 2012 11:25:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=216#comment-698</guid>
		<description>Using just #quote for numerical fields is not enough, and you&#039;ll be vulnerable to SQL injections unless you also force the ruby type to numbers beforehand. You&#039;re just back to the world of old PHP scripts where people always forget to properly escape their data.

Use prepared statements indiscriminately and you can rest well; you lose a tiny bit of performance on one-off statements in MySQL, but it&#039;s negligible when compared to the otherwise potential security risk.</description>
		<content:encoded><![CDATA[<p>Using just #quote for numerical fields is not enough, and you&#8217;ll be vulnerable to SQL injections unless you also force the ruby type to numbers beforehand. You&#8217;re just back to the world of old PHP scripts where people always forget to properly escape their data.</p>
<p>Use prepared statements indiscriminately and you can rest well; you lose a tiny bit of performance on one-off statements in MySQL, but it&#8217;s negligible when compared to the otherwise potential security risk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Geo-Rails part 8: ZCTA Lookup, A Worked Example by Daniel Azuma</title>
		<link>http://www.daniel-azuma.com/blog/archives/191#comment-693</link>
		<dc:creator>Daniel Azuma</dc:creator>
		<pubDate>Thu, 26 Jan 2012 01:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=191#comment-693</guid>
		<description>Csaba,

Sorry, I got busy last week and your question fell off my radar. My fault.

The ewkb format that you&#039;re passing into ST_GeomFromEWKB is missing the SRID. Now I see that this is because there was a typo in my sample code. I said:

&lt;code&gt;EWKB = RGeo::WKRep::WKBGenerator.new(:type_format =&gt; :ewkb, :emit_ewkg_srid =&gt; true, :hex_format =&gt; true)&lt;/code&gt;

That should have been:

&lt;code&gt;EWKB = RGeo::WKRep::WKBGenerator.new(:type_format =&gt; :ewkb, :emit_ewkb_srid =&gt; true, :hex_format =&gt; true)&lt;/code&gt;

(:emit_ewkb_srid, not :emit_ewkg_srid). Ugh. I need to proofread better. You&#039;re also right about the &quot;each_geometry&quot;. I&#039;ll get both those fixed in the article.</description>
		<content:encoded><![CDATA[<p>Csaba,</p>
<p>Sorry, I got busy last week and your question fell off my radar. My fault.</p>
<p>The ewkb format that you&#8217;re passing into ST_GeomFromEWKB is missing the SRID. Now I see that this is because there was a typo in my sample code. I said:</p>
<p><code>EWKB = RGeo::WKRep::WKBGenerator.new(:type_format => :ewkb, :emit_ewkg_srid => true, :hex_format => true)</code></p>
<p>That should have been:</p>
<p><code>EWKB = RGeo::WKRep::WKBGenerator.new(:type_format => :ewkb, :emit_ewkb_srid => true, :hex_format => true)</code></p>
<p>(:emit_ewkb_srid, not :emit_ewkg_srid). Ugh. I need to proofread better. You&#8217;re also right about the &#8220;each_geometry&#8221;. I&#8217;ll get both those fixed in the article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Geo-Rails part 2: Setting Up a Geospatial Rails App by Colin</title>
		<link>http://www.daniel-azuma.com/blog/archives/69#comment-692</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Wed, 25 Jan 2012 21:37:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=69#comment-692</guid>
		<description>It&#039;s a very detailing series from what I&#039;ve read so far.

This might be slightly off topic but do you know how easy it would be to integrate postgres text search in with a geo-spacial app like this? - any example github apps or tutorials anywhere would be great. I&#039;m not finding any so far that contain both search and geo with postgres.</description>
		<content:encoded><![CDATA[<p>It&#8217;s a very detailing series from what I&#8217;ve read so far.</p>
<p>This might be slightly off topic but do you know how easy it would be to integrate postgres text search in with a geo-spacial app like this? &#8211; any example github apps or tutorials anywhere would be great. I&#8217;m not finding any so far that contain both search and geo with postgres.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Geo-Rails part 8: ZCTA Lookup, A Worked Example by Csaba N</title>
		<link>http://www.daniel-azuma.com/blog/archives/191#comment-625</link>
		<dc:creator>Csaba N</dc:creator>
		<pubDate>Wed, 18 Jan 2012 19:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=191#comment-625</guid>
		<description>Hi Daniel!

I&#039;m trying to follow your tutorial using Zilliows neighborhood maps. I&#039;m getting 
SELECT &quot;neighborhoods&quot;.* FROM &quot;neighborhoods&quot; WHERE (ST_Intersects(region, ST_GeomFromEWKB(E&#039;\\x0000000001c168e64fb493c5ba414d8fa19831dca9&#039;)))
ActiveRecord::StatementInvalid: PGError: ERROR:  Operation on mixed SRID geometries

When I would like to do Neighborhood.containing_latlon(32.8440857175,-117.2713740425).
I have the region column SRID set to 3785, Neighborhood class has the simple mercator factory. Migration and importing went without a glitch (Except NoMethodError: undefined method `each_geometry&#039; for #, which I changed to each).
I found a nice troubleshooting guide at http://ragrawal.wordpress.com/2009/12/08/operations_on_mixed_geometries, I tried the advised solutions, but doesn&#039;t seem to help. Any thoughts on what am I doing wrong?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Daniel!</p>
<p>I&#8217;m trying to follow your tutorial using Zilliows neighborhood maps. I&#8217;m getting<br />
SELECT &#8220;neighborhoods&#8221;.* FROM &#8220;neighborhoods&#8221; WHERE (ST_Intersects(region, ST_GeomFromEWKB(E&#8217;\\x0000000001c168e64fb493c5ba414d8fa19831dca9&#8242;)))<br />
ActiveRecord::StatementInvalid: PGError: ERROR:  Operation on mixed SRID geometries</p>
<p>When I would like to do Neighborhood.containing_latlon(32.8440857175,-117.2713740425).<br />
I have the region column SRID set to 3785, Neighborhood class has the simple mercator factory. Migration and importing went without a glitch (Except NoMethodError: undefined method `each_geometry&#8217; for #, which I changed to each).<br />
I found a nice troubleshooting guide at <a href="http://ragrawal.wordpress.com/2009/12/08/operations_on_mixed_geometries" rel="nofollow">http://ragrawal.wordpress.com/2009/12/08/operations_on_mixed_geometries</a>, I tried the advised solutions, but doesn&#8217;t seem to help. Any thoughts on what am I doing wrong?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Geo-Rails part 8: ZCTA Lookup, A Worked Example by Marc B</title>
		<link>http://www.daniel-azuma.com/blog/archives/191#comment-602</link>
		<dc:creator>Marc B</dc:creator>
		<pubDate>Mon, 16 Jan 2012 23:48:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=191#comment-602</guid>
		<description>Hi Daniel,
I would request more information about how PostGIS is implemented. How does it store and query for data. How are the indexes made and why can they be such a performance hit?
I would also like to know about such things at the &#039;spatial_ref_sys&#039; and &#039;geometry_columns&#039; tables that get created. 
In addition, I would like to know more about how rgeo is implemented in rails. How does it to its magic? You&#039;ve explained the factories, but there is so much more! 
I have so many more questions to ask as well, so let me know if you need more topics.</description>
		<content:encoded><![CDATA[<p>Hi Daniel,<br />
I would request more information about how PostGIS is implemented. How does it store and query for data. How are the indexes made and why can they be such a performance hit?<br />
I would also like to know about such things at the &#8216;spatial_ref_sys&#8217; and &#8216;geometry_columns&#8217; tables that get created.<br />
In addition, I would like to know more about how rgeo is implemented in rails. How does it to its magic? You&#8217;ve explained the factories, but there is so much more!<br />
I have so many more questions to ask as well, so let me know if you need more topics.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Geo-Rails part 8: ZCTA Lookup, A Worked Example by Geo-Rails part 8 posted : RubyFlow &#124; Programmer Solution</title>
		<link>http://www.daniel-azuma.com/blog/archives/191#comment-593</link>
		<dc:creator>Geo-Rails part 8 posted : RubyFlow &#124; Programmer Solution</dc:creator>
		<pubDate>Mon, 16 Jan 2012 08:59:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=191#comment-593</guid>
		<description>[...] part 8 posted : RubyFlow     I posted Geo-Rails part 8: ZCTA Lookup, A Worked Example, the latest installment in my ongoing series on geospatial programming using Ruby and Rails. Here [...]</description>
		<content:encoded><![CDATA[<p>[...] part 8 posted : RubyFlow     I posted Geo-Rails part 8: ZCTA Lookup, A Worked Example, the latest installment in my ongoing series on geospatial programming using Ruby and Rails. Here [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Geo-Rails part 2: Setting Up a Geospatial Rails App by Daniel Azuma</title>
		<link>http://www.daniel-azuma.com/blog/archives/69#comment-592</link>
		<dc:creator>Daniel Azuma</dc:creator>
		<pubDate>Mon, 16 Jan 2012 08:08:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.daniel-azuma.com/blog/?p=69#comment-592</guid>
		<description>Tad: that&#039;s a good point. (No pun intended...) I&#039;ll try to use &quot;lonlat&quot; in examples from now on.</description>
		<content:encoded><![CDATA[<p>Tad: that&#8217;s a good point. (No pun intended&#8230;) I&#8217;ll try to use &#8220;lonlat&#8221; in examples from now on.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

