[postgis-users] Newbie - Spatial Join with a large dataset

James David Smith james.david.smith at gmail.com
Mon Jul 11 14:24:11 PDT 2011


Rich,

If you've got those details then you should be good to go. Use the
ST_Within Function to select the points that are within the polygons
of the contients that you want to show.

http://www.postgis.org/docs/ST_Within.html

Cheers

James

On 11 July 2011 18:54, Rich B <richisgeo at gmail.com> wrote:
> Thank you!
> Yes I do have both of those datasets. I'll run the spatial join that way and see what happens.
> *fingers crossed*
>
>
>
> On Jul 11, 2011, at 5:20 AM, James David Smith <james.david.smith at gmail.com> wrote:
>
>> Hey Rich,
>>
>> I'm a newbie myself, but it seems to me that you either need a table
>> that defines the geometry of the continents (so that you can do a
>> spatial join with the points), or the points table itself needs a
>> column which tells you in which continent that point is located. Do
>> you have either of these at the moment?
>>
>> Cheers
>>
>> James
>>
>> On 10 July 2011 20:34, Rich B <richisgeo at gmail.com> wrote:
>>> Hello all,
>>>
>>> I have a newbie question for you guys…here goes :
>>>
>>>
>>>
>>> I have a large dataset (a geonames world data-dump) that I’ve imported into
>>> Postgis.
>>>
>>> I want to know how to do a Spatial Join with this dataset so that I can
>>> split the millions of points up into chunks by continent.
>>>
>>> For example :
>>>
>>> A user connects to the database in QGIS and wants to select all of the
>>> cities  (I’m going to trim the data down a little more using a query later
>>> on) and they want to bring in only the points that fall in Europe or Africa.
>>>
>>> In a nutshell I want a user to select all the points by continent instead of
>>> loading the whole dataset.
>>>
>>>
>>>
>>> I’m sure there’s an easy way to do this , and I’m probably going to slap
>>> myself for not thinking of this earlier.
>>>
>>> I’m relatively new to OSGIS and I’m getting the hang of it. I’ve been an
>>> ESRI guy for a while.
>>>
>>>
>>>
>>> Thanks in advance for the feedback.
>>>
>>>
>>>
>>> Cheers!!!
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list