Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Point-to-Polygon in Stata

From   Nick Cox <>
To   "" <>
Subject   Re: st: Point-to-Polygon in Stata
Date   Tue, 16 Apr 2013 15:40:07 +0100

Non sequitur to your bottom line. Point-in-polygon code available for
free is easy to find. I found a free R package in less than a minute.
So you don't need to use a proprietary GIS. (I am shocked to learn
that a substantial U.S. university doesn't have a licence, but there
you go.)

I'll match you in preference to do things in Stata wherever possible,
but you already have an answer. Maurizio Pisati wrote a Mata function
which you would need to integrate into Stata code. If that's too
difficult, as it could well be if you have no real experience of
programming in Stata, I think you'll need to go outside Stata.


On 16 April 2013 15:21, Jeremy Wells <> wrote:

> I have been using Dr. Pisati's fun spmap program, but I have run into
> a bit of a snag.
> I have a dataset of about 76,000 observations, coded by latitude/longitude,
> in one country. I also have the coordinate file for the country produced by
> shp2dta that includes the country's provinces. I would like to add a variable
> to the dataset that codes each observation with the region from the coordinate
> file, which is essentially a point-to-polygon operation.
> I have tried to find a way to doing this, including this (
> from Dr. Pisati, but I am not at all sure how to apply the code. (Plus,
> this was written five years ago, so surely there is something that has
> been developed and is a little easier to use!)
> Thanks for your consideration! Please limit the responses to Stata-only
> applications as I do not have access to expensive GIS software.
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index