I'm pretty new to working with shapesfiles. I'm trying to create a spatial index of addresses in NYC. I completed it using an rtree but have only done it for Manhattan. To complete the other counties in NYC I'd like to combine the shapefiles for each county. The source I'm using for the shapefiles in the NYC Pluto file (http://www.nyc.gov/html/dcp/html/bytes/dwn_pluto_mappluto.shtml#mappluto). It looks like there's isn't a single shapefile for the whole city. Rather there are five shapefiles, one for each county.
Can anyone please point me in the right direction to combine the shapefiles so I can run the rtree code on a singe shapefile, rather than 5.
I'm using Python.
-
1Are you looking for an open-source solution or an ArcGIS solution? It may be easiest to use ArcGIS or QGIS to do the merge directly, rather than using a programmatic approach.Aaron– Aaron ♦2015年05月04日 20:47:20 +00:00Commented May 4, 2015 at 20:47
-
1Open source if possible.Richard– Richard2015年05月05日 01:33:14 +00:00Commented May 5, 2015 at 1:33
1 Answer 1
You may use QGIS and somebody had a question about that before.
How to merge shape files with attributes from a python script in QGIS?
There are also fiona and shapely python modules
http://www.macwright.org/2012/10/31/gis-with-python-shapely-fiona.html
Using GDAL/OGR modulues is another option http://gis-programming.com/?p=194