Hey all, I'm somewhat of a newb when it comes to creating mapping solutions. I've stayed on a pretty high level playing with openlayers and pulling data from various webservices.

The first part of my question is the realm of how do I compute polys?

I understand poly basics, such that it's a 2 dimensional shape that you can create a boundary with. For example, when you enter your zip code in the following example. The red line illustrates the boundaries, which is understood as a poly, correct? Could you link me information on this concept, and how to create polygons and how to work with them. I'm very fluent in python, and I think there is a GIS-python module/postgre-gis?

The second part is, how do I go about matching coordinates in said polys? What is the algorithm I need to make this happen? Is there an open-source project that I can use to calculate this? Preferably in c++ or python.

Third, where can I obtain datasets of Country, State/Territory, County/Providence, City/Town, Neighborhood.

Thanks in advance!

closed as not a real question by underdark Jun 17 '11 at 7:41

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    More than One Question in there - For Openlayers? Google Maps? - Which area for datasets are you interested in? data quality varies across the globe. – Mapperz Mar 17 '11 at 16:44

Openlayers GML (Polygon construction)

16          <gml:MultiPolygon srsName="EPSG:4326">
17          <gml:polygonMember>
18            <gml:Polygon>
19              <gml:outerBoundaryIs>
20                <gml:LinearRing>
21                  <gml:coordinates>-0.318987,47.003018 -0.768746,47.358268 -0.574463,47.684285 -0.347374,47.854602 -0.006740,47.925567 0.135191,47.726864 0.149384,47.599127 0.419052,47.670092 0.532597,47.428810 0.305508,47.443003 0.475824,47.144948 0.064225,47.201721 -0.318987,47.003018 </gml:coordinates>
22                </gml:LinearRing>
23              </gml:outerBoundaryIs>
24              <gml:innerBoundaryIs>
25                <gml:LinearRing>
26                  <gml:coordinates>-0.035126,47.485582 -0.035126,47.485582 -0.049319,47.641706 -0.233829,47.655899 -0.375760,47.457196 -0.276408,47.286879 -0.035126,47.485582 </gml:coordinates>
27                </gml:LinearRing>
28              </gml:innerBoundaryIs>
29            </gml:Polygon>
30          </gml:polygonMember>
31          </gml:MultiPolygon>
32          </ms:msGeometry>


  • This only answers the first part of the question. – jbcurtin Mar 17 '11 at 17:02
  • Yes it does, depends on your data source - you need to have a geoprocessing database (postgis) to INTERSECT the Polygon and select the points – Mapperz Mar 17 '11 at 18:08

Natural Earth (http://www.naturalearthdata.com/) will provide you with global countries and first order admin areas (states etc).

In the USA the Census bureau is the best place to find boundaries http://www.census.gov/geo/www/tiger/ will get you counties and townships etc. In other countries that data may or may not be freely available.

Neighbourhoods are trickier as they tend to be a bottom up concept not a top down boundary, try the Flickr shapefiles (http://flowingdata.com/2008/11/28/neighborhood-boundaries-with-flickr-shapefiles/).


For your other question see https://secure.wikimedia.org/wikipedia/en/wiki/Point_in_polygon for a description of how to determine if a point is in a polygon.


You can download neighborhood data in shapefile from Zillow (quote from their website):

The Zillow data team has created a database of nearly 7,000 neighborhood boundaries in the largest cities in the U.S. And we'd like to share them with you! We're sharing these neighborhoods under a Creative Commons license to allow people to use and contribute to our growing database.


Not the answer you're looking for? Browse other questions tagged or ask your own question.