success

I compiled geos -- standard './configure', 'make', 'make install'. I then compiled PostGIS again:

LDFLAGS=-lstdc++ ./configure --with-geos=/usr/local/bin/geos-config

which was pretty quick, surprisingly. 'make', 'make install', and then done! Bingo!

But the query wouldn't work, wouldn't return anything. After messing around for a while, I realized that TRACT was lowercase, and Contains should be ST_Contains. It still didn't work, until I realized that ST_Contains returns a boolean value, and tried comparing to 'TRUE' instead of '1':

SELECT t.tract FROM cshape t WHERE ST_Contains(t.geom, GeomFromText('Point( -73.965331 40.806129)')) = TRUE;

The address values are different this time, because the previous address was right on the boundary of two census tracts and I just wanted to be sure. I got:

 tract 
-------
 0199

Awesome! American FactFinder verifies this.

GPS->Census Tract info correlation success! Now for the data/information stuff.

Posted by provolot on July 21, 2007 7:38 PM | | Comments (0)

TrackBack

TrackBack URL for this entry:
http://www.provolot.com/cgi-bin/mt5/mt-tb.cgi/84

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)