<?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 iknuth</title>
	<atom:link href="http://iknuth.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://iknuth.com</link>
	<description>gis - database - systems - web programming</description>
	<lastBuildDate>Wed, 18 Jan 2012 18:01:50 +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 making seatmate aware of locations with postgis by edwin</title>
		<link>http://iknuth.com/2012/01/making-seatmate-aware-of-locations-with-postgis/comment-page-1/#comment-4382</link>
		<dc:creator>edwin</dc:creator>
		<pubDate>Wed, 18 Jan 2012 18:01:50 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=515#comment-4382</guid>
		<description>Hi Regina,

Thank you very much for the feedback.  I knew I was getting in trouble by not using the ST functions! ;)

In this case the min is required because the query usually finds two records with the same route and description, but traveling in different directions.  Since we aren&#039;t grouping by the_geom, it needs to go into an aggregate.  In this case I only want the closest route, so min is the way to go.

That is good to know about shp2pgsql.  I generally use the command line tools, but I&#039;m working on a qgis post and wanted to use spit.

Thanks!
Edwin</description>
		<content:encoded><![CDATA[<p>Hi Regina,</p>
<p>Thank you very much for the feedback.  I knew I was getting in trouble by not using the ST functions! ;)</p>
<p>In this case the min is required because the query usually finds two records with the same route and description, but traveling in different directions.  Since we aren&#8217;t grouping by the_geom, it needs to go into an aggregate.  In this case I only want the closest route, so min is the way to go.</p>
<p>That is good to know about shp2pgsql.  I generally use the command line tools, but I&#8217;m working on a qgis post and wanted to use spit.</p>
<p>Thanks!<br />
Edwin</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on making seatmate aware of locations with postgis by Regina</title>
		<link>http://iknuth.com/2012/01/making-seatmate-aware-of-locations-with-postgis/comment-page-1/#comment-4381</link>
		<dc:creator>Regina</dc:creator>
		<pubDate>Wed, 18 Jan 2012 14:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=515#comment-4381</guid>
		<description>Edwin and others,

Quick note for future maintainability.  Don&#039;t use PointFromText, distance etc.  Those have been removed in PostGIS 2.0.  In fact I would stay away from any PointFromText variant as that is slower than the more generic ST_GeomFromText because it does type checking.
Also why you have that MIN in there is beyond me.  I&#039;m assuming that&#039;s a mistake.

So your code would look like:

&lt;code&gt;
SELECT &quot;RTE&quot; as route, &quot;RTE_DESC&quot; as description,ST_distance(ST_GeomFromText(&#039;POINT(-122.613639 45.499541)&#039;, 4326), the_geom) as distance
from tm_routes group by route, description
order by distance limit 10;&lt;/code&gt;

Did you use SPIT to import this file in?  shp2pgsql that comes packaged with PostGIS  automatically lower cases the column names unless overwritten, so you shouldn&#039;t have this problem.</description>
		<content:encoded><![CDATA[<p>Edwin and others,</p>
<p>Quick note for future maintainability.  Don&#8217;t use PointFromText, distance etc.  Those have been removed in PostGIS 2.0.  In fact I would stay away from any PointFromText variant as that is slower than the more generic ST_GeomFromText because it does type checking.<br />
Also why you have that MIN in there is beyond me.  I&#8217;m assuming that&#8217;s a mistake.</p>
<p>So your code would look like:</p>
<p><code><br />
SELECT "RTE" as route, "RTE_DESC" as description,ST_distance(ST_GeomFromText('POINT(-122.613639 45.499541)', 4326), the_geom) as distance<br />
from tm_routes group by route, description<br />
order by distance limit 10;</code></p>
<p>Did you use SPIT to import this file in?  shp2pgsql that comes packaged with PostGIS  automatically lower cases the column names unless overwritten, so you shouldn&#8217;t have this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on making seatmate aware of locations with postgis by edwin</title>
		<link>http://iknuth.com/2012/01/making-seatmate-aware-of-locations-with-postgis/comment-page-1/#comment-4353</link>
		<dc:creator>edwin</dc:creator>
		<pubDate>Sun, 15 Jan 2012 19:18:17 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=515#comment-4353</guid>
		<description>Hi Pablo,

Those units would be decimal degrees.  Not the most useful unit for walking directions ;)

You can get the distance in meters if you use the distance_sphere method rather than distance.  The results are supposed to be a little slower and less accurate.  I&#039;m not worrying about speed or spatial indexes, yet.

Here is what the query would look like with distance_sphere:

SELECT &quot;RTE&quot; as route,&quot;RTE_DESC&quot; as description,&quot;DIR_DESC&quot; as direction,
distance_sphere(PointFromText(&#039;POINT(-122.613639 45.499541)&#039;, 4326), the_geom) as distance
from tm_routes order by distance limit 10;</description>
		<content:encoded><![CDATA[<p>Hi Pablo,</p>
<p>Those units would be decimal degrees.  Not the most useful unit for walking directions ;)</p>
<p>You can get the distance in meters if you use the distance_sphere method rather than distance.  The results are supposed to be a little slower and less accurate.  I&#8217;m not worrying about speed or spatial indexes, yet.</p>
<p>Here is what the query would look like with distance_sphere:</p>
<p>SELECT &#8220;RTE&#8221; as route,&#8221;RTE_DESC&#8221; as description,&#8221;DIR_DESC&#8221; as direction,<br />
distance_sphere(PointFromText(&#8216;POINT(-122.613639 45.499541)&#8217;, 4326), the_geom) as distance<br />
from tm_routes order by distance limit 10;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on making seatmate aware of locations with postgis by pabloj</title>
		<link>http://iknuth.com/2012/01/making-seatmate-aware-of-locations-with-postgis/comment-page-1/#comment-4350</link>
		<dc:creator>pabloj</dc:creator>
		<pubDate>Sun, 15 Jan 2012 09:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=515#comment-4350</guid>
		<description>Just a quick question, what is the unit of measure for the distance obtained above?</description>
		<content:encoded><![CDATA[<p>Just a quick question, what is the unit of measure for the distance obtained above?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on deploying a django app to heroku with easy static files on s3 by Yaniv Aknin</title>
		<link>http://iknuth.com/2011/10/deploying-a-django-app-to-heroku-with-easy-static-files-on-s3/comment-page-1/#comment-4144</link>
		<dc:creator>Yaniv Aknin</dc:creator>
		<pubDate>Thu, 22 Dec 2011 16:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=383#comment-4144</guid>
		<description>Thanks for the interesting info!

There are a few aspects I&#039;m still struggling with, hoping you may have elegant ideas.
1. What about upgrades? Suppose I had sprite.png with all sorts of sprites, and now I want to change it. There&#039;s a race between collectstatic and the actual code update, where people might get the new png but with the old sprite coordinates. In the case of code-ish statics (js/css), it could be even worse. Any idea about solving that?

2. Also, what do you do in development? Add the static serving code from contrib.staticfiles to urls.py and let gunicorn serve it?

3. And finally, what about statics like favicon.ico or robots.txt? Where would you put those and how would you handle the URL redirection?

Cheers!</description>
		<content:encoded><![CDATA[<p>Thanks for the interesting info!</p>
<p>There are a few aspects I&#8217;m still struggling with, hoping you may have elegant ideas.<br />
1. What about upgrades? Suppose I had sprite.png with all sorts of sprites, and now I want to change it. There&#8217;s a race between collectstatic and the actual code update, where people might get the new png but with the old sprite coordinates. In the case of code-ish statics (js/css), it could be even worse. Any idea about solving that?</p>
<p>2. Also, what do you do in development? Add the static serving code from contrib.staticfiles to urls.py and let gunicorn serve it?</p>
<p>3. And finally, what about statics like favicon.ico or robots.txt? Where would you put those and how would you handle the URL redirection?</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on deploying a django app to heroku with easy static files on s3 by edwin</title>
		<link>http://iknuth.com/2011/10/deploying-a-django-app-to-heroku-with-easy-static-files-on-s3/comment-page-1/#comment-4021</link>
		<dc:creator>edwin</dc:creator>
		<pubDate>Sat, 10 Dec 2011 23:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=383#comment-4021</guid>
		<description>Hey dEb,

That is a great point!  Honestly it would be better to override the STATIC_URL setting in a local settings.py.  I meant to include a snippet to do that.  Since the developer server handles static files you could have:
STATIC_URL = &#039;/static/&#039;

in your settings_local.py and include that in your global settings.py with something like:
from settings_local import *</description>
		<content:encoded><![CDATA[<p>Hey dEb,</p>
<p>That is a great point!  Honestly it would be better to override the STATIC_URL setting in a local settings.py.  I meant to include a snippet to do that.  Since the developer server handles static files you could have:<br />
STATIC_URL = &#8216;/static/&#8217;</p>
<p>in your settings_local.py and include that in your global settings.py with something like:<br />
from settings_local import *</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on deploying a django app to heroku with easy static files on s3 by dEb</title>
		<link>http://iknuth.com/2011/10/deploying-a-django-app-to-heroku-with-easy-static-files-on-s3/comment-page-1/#comment-4020</link>
		<dc:creator>dEb</dc:creator>
		<pubDate>Sat, 10 Dec 2011 22:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=383#comment-4020</guid>
		<description>Hi. Nice. 
And for automatize all this static file stuff?
I mean, every time that I modify one js or css file need I to relaunch python manage.py collectstatic true?
There is some cool solution git-style?
I want that we I update my git project, the static file are already updated without two commands: (git pull &amp;&amp; python manage.py collecstatic (of the all my static file! :( )</description>
		<content:encoded><![CDATA[<p>Hi. Nice.<br />
And for automatize all this static file stuff?<br />
I mean, every time that I modify one js or css file need I to relaunch python manage.py collectstatic true?<br />
There is some cool solution git-style?<br />
I want that we I update my git project, the static file are already updated without two commands: (git pull &amp;&amp; python manage.py collecstatic (of the all my static file! :( )</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on deploying a django app to heroku with easy static files on s3 by Phillip Marshall</title>
		<link>http://iknuth.com/2011/10/deploying-a-django-app-to-heroku-with-easy-static-files-on-s3/comment-page-1/#comment-3816</link>
		<dc:creator>Phillip Marshall</dc:creator>
		<pubDate>Tue, 22 Nov 2011 03:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=383#comment-3816</guid>
		<description>This is cool, but it raises a predicament with django only allowing for one storage: &lt;a href=&quot;https://bitbucket.org/david/django-storages/issue/93/s3boto-seperate-buckets-for-static-and&quot; rel=&quot;nofollow&quot;&gt;see discussion here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>This is cool, but it raises a predicament with django only allowing for one storage: <a href="https://bitbucket.org/david/django-storages/issue/93/s3boto-seperate-buckets-for-static-and" rel="nofollow">see discussion here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on javascript templates with moustache and icanhaz.js by Is it Better Practice to Inject HTML Through a Server or Through JavaScript? &#124; SeekPHP.com</title>
		<link>http://iknuth.com/2011/04/javascript-templates-with-moustache-and-icanhaz-js/comment-page-1/#comment-3663</link>
		<dc:creator>Is it Better Practice to Inject HTML Through a Server or Through JavaScript? &#124; SeekPHP.com</dc:creator>
		<pubDate>Wed, 16 Nov 2011 06:51:56 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=386#comment-3663</guid>
		<description>[...] Then, on the browser, your JS app has separate Model, View and Controller code. See the Backbone project for the Model and Controller layer, Mustache for the View/Template layer. An article. Another post. [...]</description>
		<content:encoded><![CDATA[<p>[...] Then, on the browser, your JS app has separate Model, View and Controller code. See the Backbone project for the Model and Controller layer, Mustache for the View/Template layer. An article. Another post. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on deploying a django app to heroku with easy static files on s3 by Tim</title>
		<link>http://iknuth.com/2011/10/deploying-a-django-app-to-heroku-with-easy-static-files-on-s3/comment-page-1/#comment-3332</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Wed, 19 Oct 2011 17:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://iknuth.com/?p=383#comment-3332</guid>
		<description>Nice simple explanation.  Exactly what I needed. Thanks.</description>
		<content:encoded><![CDATA[<p>Nice simple explanation.  Exactly what I needed. Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

