Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there any tool available which let's me run millions of parcel shapefiles and simplify them?

share|improve this question
1  
what do you mean by simplify, the edge? –  artwork21 May 12 '11 at 1:48
1  
I think I would be concerned about running simplify on polygons without some type of topology. I don't even think esri will manage two edges being simpplified simultaneously so they remain consistent. Maybe I'm wrong. –  Brad Nesom May 12 '11 at 4:21
add comment

7 Answers

up vote 4 down vote accepted

You could try Shapely - a Python API built on top of GEOS. As both Shapely and GDAL have Python libraries you can easily combine them to data from many different sources (including shapefiles) and then simplifying and exporting as desired.

The only downside may be speed if you are doing millions of features - it could be faster to use GEOS or JTS directly.

See the simplify method:

All points in the simplified object will be within the tolerance distance of the original geometry. By default a slower algorithm is used that preserves topology. If preserve topology is set to False the much quicker Douglas-Peucker algorithm is used.

>>> p = Point(0.0, 0.0)
>>> x = p.buffer(1.0)
>>> x.area
3.1365484905459389
>>> s = x.simplify(0.05, preserve_topology=False)
>>> s.area
3.0614674589207187
share|improve this answer
add comment

ogr2ogr has a "segmentize" option that appears to do what you need: GDAL ogr2ogr documentation

From that page:

-segmentize max_dist: (starting with GDAL 1.6.0) maximum distance between 2 nodes. Used to create intermediate pointsspatial query extents

share|improve this answer
add comment

If your data is stored in PostGIS, try using ST_SimplifyPreserveTopology.

share|improve this answer
add comment

Version 9.0 of GDAL/OGR added the -simplify option to the ogr2ogr command. The documentation indicates that it preserves topology.

-simplify tolerance: (starting with GDAL 1.9.0) distance tolerance for simplification. This method will preserve topology, in particular for polygon geometries.

Example usage:

ogr2ogr outfile.shp infile.shp -simplify 0.000001
share|improve this answer
add comment

You could try Mapshaper. There are maybe some limitations due to your file size.

share|improve this answer
add comment

GRASS v.generalize

http://grass.osgeo.org/gdp/html_grass64/v.generalize.html

share|improve this answer
    
I made some test and as of today, all methods suggested here and relying on GEOS (ogr2ogr with -simplify, shapely, PostGIS's ST_SimplifyPreserveTopology function) produce topological anomalies (i.e. holes/overlaps between polygons). Only with GRASS I had good results. –  capooti Sep 18 '12 at 15:42
add comment

Inspire from Mapshaper, but directly in local, look on https://github.com/migurski/Bloch

share|improve this answer
    
thanks for your response. I guess the issue here is what to do if no topology is define with the shapefile –  NetConstructor.com Jun 26 '12 at 14:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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