<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi Joe,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>If you are working on windows you can get
a newer version of the tools (that are in fwtools) using the awesome osgeo4win downloader
<a href="http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe">http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe</a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>There are many ways to do this but if I
where to do this I would (to avoid overhead with scripting etc) import the data
(points and the census blocks) into a spatialite database ( see <a
href="http://www.gaia-gis.it/gaia-sins/">http://www.gaia-gis.it/gaia-sins/</a> )
using ogr2ogr <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>(or the spatialite gui tools)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>and then using the spatilalite gui and &nbsp;run
a spatial intersect query that will give you your results. For example something
like this:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>select id. census blocks , id. yourpoints from
censusblocks, yourpoints where censusblocks.the_geom &amp;&amp; yourpoints.the_geom
and intersects (censusblocks.the_geom, yourpoints.the_geom);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The same can be done with postgis almost
identically but then you have a little more overhead to install the postgresql/
postgis &nbsp;etc to get this done.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Cheers<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Karsten <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> fwtools-bounces@lists.maptools.org
[mailto:fwtools-bounces@lists.maptools.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Chaitanya kumar CH<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, March 19, 2012 1:40
AM<br>
<b><span style='font-weight:bold'>To:</span></b> Joe McMichael<br>
<b><span style='font-weight:bold'>Cc:</span></b> fwtools@lists.maptools.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [FWTools] Point in
polygon</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Joe,<br>
<br>
First note that FWtools for Windows is very old and not recommended.<br>
<br>
It is easy to write a python script that cycles through the coordinates and
select the census block after applying a filter. We can also cycle through the
blocks and get the set of coordinates and then use the OGRGeometry::Contains
method to confirm.<br>
<br>
The problem here is that there is no straight forward way to use spatial
indexes.<br>
<br>
There may be other options, like PostGIS, depending on your exact requirements.<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Mon, Mar 19, 2012 at 4:20 AM, Joe McMichael &lt;<a
href="mailto:joemcmichael@gmail.com">joemcmichael@gmail.com</a>&gt; wrote:<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
Hello GIS folks!<br>
<br>
I have a large number of lat/lon coordinates(120 million) that I would like to
know which census block they fall into. Can FWtools be used to crosswalk points
to polygons? Maybe you know of a better method?<br>
<br>
Thanks in advance for your advice.<font color="#888888"><span style='color:
#888888'><br clear=all>
<br>
<span class=hoenzb>Joe</span><br>
</span></font><br>
_______________________________________________<br>
FWTools mailing list<br>
<a href="mailto:FWTools@lists.maptools.org">FWTools@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/fwtools" target="_blank">http://lists.maptools.org/mailman/listinfo/fwtools</a><br>
<a href="http://fwtools.maptools.org/" target="_blank">http://fwtools.maptools.org/</a><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
Best regards,<br>
Chaitanya kumar CH.<br>
<br>
+91-9494447584<br>
17.2416N 80.1426E<br>
<br>
<br>
<br>
<br>
</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><br>
=======<br>
Email scanned by PC Tools - No viruses or spyware found.<br>
(Email Guard: 9.0.0.898, Virus/Spyware Database: 6.19480)<br>
<a href="http://www.pctools.com/?cclick=EmailFooterClean_51">http://www.pctools.com</a><br>
=======</span></font> <o:p></o:p></p>

</div>

</body>

</html>