On Fri, 17 Dec 2010 11:19:03 +0000
Philip Stubbs <[email protected]> wrote:
> area of the shapefiles. What I would like to to is extract a list of
> names from all the roads that come from the PostGIS database that are
> within the shapefile polygon. Is that possible?

So presumably "shp2pgsql" will give you the right way to convert your
shapefile polygon into a PostGIS poly, at which point it's just:

  SELECT names FROM roads WHERE Within(roads.the_geom, yourpolygeom);

And your road centers would be something like:

  SELECT names, Centroid(the_geom) FROM roads
     WHERE Within(the_geom, yourpolygeom);

What I'm less clear on (before 6AM local time, preparing to drive most
of the day...) is how to get from the shapefile to yourpolygeom, but you
could easily just use shp2pgsql to load that shapefile into a 1 record
table.

Dan
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to