<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hello,</div><div><br></div><div>I'm pretty new to postgreSQL / postGIS and am running with pgadmin and using with QGIS and R.</div><div><br></div><div>I am attempting to perform a Spatial Join of 3000 thousand towns (points) to 1000 enumeration areas (polygons) where the name of each town which shares a common geometry with its enumeration area is included as an attribute in a field.  In doing so, I have started with the following command.</div><div><br></div><div><div>SELECT towns_r1.name, towns_r1.twn_ea_nos, </div><div>                 ea_r1.gid, ea_r1.ea_nos, ea_r1.the_geom</div><div>INTO TABLE region1_eas</div><div>FROM towns_r1, ea_r1</div><div>WHERE ST_Within(towns_r1.the_geom, ea_r1.the_geom);</div></div><div><br></div><div>which gives me a table of 3000 enumerations areas, with the name of each individual town and the geometry for each enumeration area repeated, depending on how many towns were located within it.</div><div><br></div><div>What I am attempting to achieve, is to summarize or aggregate to 1000 enumeration areas, where each row has a field (single field the names of all towns listed within?), which includes the name of each town located within that enumeration area.</div><div><br></div><div>any pointers on how to proceed?</div><div><br></div><div>Thanks!</div><div>Ty</div><div apple-content-edited="true"><br class="Apple-interchange-newline">
</div>
<br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>Tyler Frazier, Postdoctoral Fellow</div><div>Santa Fe Institute</div><div><a href="mailto:tyler@santafe.edu">tyler@santafe.edu</a></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>