23

Aragon's answer is good for generalization. Bryan's answer is good for smoothing but is a little convoluted. Here are two alternatives for smoothing: Use the GRASS v.generalizer tool from the Processing toolbox. This is the module on which the QGIS Generalizer Plugin in Bryan's answer is built. The GRASS tool allows you to use polygons so you can avoid ...


17

GRASS is topology-aware. You can use v.generalize from the Processing toolbox to simplify polygons and if the input data is topologically correct so will the output.


17

I've also had luck using the QGIS Generalizer plugin (enable experimental plugins), and then: Vector > Geometry Tools > Polygons to lines Then use the Generalizer plugin to smooth the lines and vertices Plugins > Generalizer > Generalizer Algorithm: "Chaiken's Algorithm" Then turn the lines back into a polygons Vector > Geometry Tools &...


15

The morphological operations Expand and Shrink were created for this kind of processing. Use ArcGIS (or GRASS or Mathematica) because R's "raster" library is too slow. Often it helps to experiment a little with the parameters: you have to decide how much expanding and shrinking is needed to clean an image; and usually you want to do as little as possible, ...


12

Using the Spatial Analyst Extension, you can use some of the Generalization tools. Some of them perform similar tasks, so you might need to play around with a few to get the results to be how you want them. But, I would have a look at the Majority Filter tool and the Boundary Clean tool. Here is a page on the concepts of these two tools. I'm not sure how ...


11

1) create a new grid with 1 m spacing (fishnet) 2) use "spatial join" to aggregate the attributes of the points falling inside the polygons 3) create the centroids of the polygons 3b) Alternatively, you can make a spatial join between the centroids and your original points so that you can define more advanced merging rules (aka based on the distance)


10

One possible approach consists in the following steps: draw a buffer of 5m around points; dissolve the buffers which overlap; calculate the centroids of dissolved buffers. You can choose the tools with which you're more comfortable. Example For instance, using GDAL >= 1.10.0 compiled with SQLite and SpatiaLite you can calculate the buffer around your ...


9

Use the Delete Identical (Data Management) tool in ArcGIS. You can see from the screenshots, I generated a uniform grid of points within the polygon extent and used the Delete Identical tool with a 10m XY tolerance to thin the points. Alternatively, use the Integrate (Data Management) tool to make points coincident at a certain XY tolerance.


9

If your goal is to create a polygon representing the outline of a set of features, you're probably looking to create the concave-hull of this features set. While the creation of a convex-hull is a pretty straightforward operation, because there is only one possible convex-hull for a given set, this is not true in the case of the concave-hull. Because ...


8

This can be seen as a preliminary to @Underdark's answer whereby you can clean the topology of the vector layer before generalizing. GRASS has a v.clean function which contains a number of tools to repair the layer such as: snap which 'snaps' lines to the nearest vertex rmdangle which removes any annoying dangles rmdupl which removes duplicated geometry ...


7

There is a discussion about this on r-sig-geo. For a definitive answer you should ask there, cause there are peoples which know the insights of spatial R. But, you can also do this in GIS desktop applications (export the shape using writeOGR command from rgdal or writePolyShape() from maptools) like QuantumGIS, GRASS or SAGA. For QuantumGIS use Vector / ...


7

It is now available the Smooth geometry algorithm via Processing Toolbox > QGIS geoalgorithms > Vector Geometry Tools. Take jagged geometry objects Set options (I changed the Iterations field to 5 and was satisfied with the result) Get smoothed object


7

The name for this kink in a geometry is an "inversion". It is not a topology error per se (as explained in this answer), but it can be an indication of coordinate collapse (such as at the mouth of a harbor, etc.). I can't think of any elegant way to identify inversions. One possible solution (that I haven't tried) would convert the polygon rings to ...


7

Take a look at these tools: Generalize (Editing) or Simplify Polygon (Cartography) Input your features, and an optional tolerance.


7

Yes, there is an option to do exactly that in the Labels placement option in QGIS 3.4+ - you can set placement of labels along a generated geometry. Under the Placement tab, scroll down to 'Geometry generator' and check the box, then change the geometry to Linestring, then enter an expression to simplify your base geometry by the desired factor (here ...


6

A quick and dirty solution would be to simply apply a Ramer-Douglas-Peucker filter to the road sections. Note that there are variations of the algorithm preserving topology: See for example here and there,with rivers. If you aim at developing more advanced generalisation for a better cartographic result, I am afraid no such tool exists (yet) in GRASS and ...


6

There is a difference in wording but I think the options from the Generalizer plugin exists in the v.generalizer interface. Using Google Translate (yes, not the best thing to use) for the Generalizer Homepage, we can find a description on each algorithms used and their corresponding parameters. In terms of Hermite Spline Interpolation, the homepage tells ...


6

I'm guessing you are using GRASS 6.4.x as there were issues regarding generalizing polygons with holes. This has been fixed in GRASS 7, although I do not have this version so cannot confirm it. A workaround would be to use the Fill holes tool from the Processing Toolbox on your original layer: Use the Difference tool on both the original and filled layers: ...


5

Use Focal Statistics weighted kernel file to omit the central cell with the format: 3 3 1 1 1 1 0 1 1 1 1 See example of ASCII weighted kernel file in the help topic How Focal Statistics works. Save as *.txt. The only statistics available with this neighborhood are mean, std, and in this case sum (useful on binary rasters of each landcover value - so ...


5

For an FME solution, the most useful transformer would probably be the Generalizer. It has several algorithms grouped into four types. Here's a list of algorithms: From the documentation: Generalizing algorithms: Reduce the density of coordinates by removing vertices. Smoothing algorithms: Determine a new location for each vertex. Measuring ...


5

I can only speak for ArcGIS, but since you didn't mention any specific software, here's my answer. The Simplify Polygon tool with the POINT_REMOVE option should do what you want. From the help: POINT_REMOVE—Keeps the so-called critical points that depict the essential shape of a polygon and removes all other points


5

Have a look at this page. Follow the instructions, you can select multiple polygons by drawing a box around them with the tool and then run the generalize edge tool. Here is a polygon with "extra" vertices: After running the Generalize edge tool and fiddling around with the tolerance scroll bar I created this: Your question gives no indication of the ...


5

It might help to add vertices to the long segments without vertices. It seems counterintuitive, but I think you'll get better results from the simplification tool when the vertices of the input line are spaced at approximately equal distances. Estimate the average distance between vertices in the very dense areas. Then use that distance in the densify by ...


4

This could be a comment to MikeT's excellent answer, if it wasn't too long and too complex. I've played with it a lot and made a QGIS plugin named FFT Convolution Filters (in "experimental" stage yet) based on his function. Besides smoothing, the plugin can also sharpen edges by subtracting the smoothed raster from the original one. I've upgraded Mike's ...


4

It is a challenge to solve this one without creating (possibly a great number of) indicator grids, one per classification, and then carrying out a lot of expensive reclassifications and conditional calculations. Here's one way. I interpret the question as asking to identify cells in which at most one of their eight neighbors has the same value as the cell ...


4

You can use the thinning tool that is available for LAS datasets, lasthin, from LASTools (free download). Although I haven't used it a lot on shapefiles myself (I have tried it on LAS files though), the help text states: Uses lasthin.exe to thin LiDAR points by placing a uniform grid over the points and keeping within each grid cell only the point with ...


4

The best approach I guess is using real topology data. Then you can share the edges between data sets and simplify as much as you want. Here is an example from the man behind the topology implimentation in PostGIS. http://strk.keybit.net/blog/2013/03/08/on-the-fly-simplification-of-topologically-defined-geometries/


4

I recommend you to use the brand new geoalgorithm from QGIS 2.14.1, named Smooth.py With Smooth Geometry it's possible to smooth the entire polygon, not only the boundaries, as in Chaiken method from v.generalize


3

The osm2pgsql importer for postgis does this generalizing: The table planet_osm_roads is designed for low zoomlevels, while planet_osm_line contains the complete geometry. See also http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema#Processed_Data It works with OSM raw data in xml format, not shapefiles. You can get all kinds of regional extracts from ...


3

Here is an R solution. Other questions on this site demonstrate how to read and write raster files in R, so let's get right to the solution. First, some random data to illustrate the procedure: n.rows <- 1000 n.cols <- 1000 r <- outer(1:n.rows, 1:n.cols, function(x,y) sin(x/100) * cos(((100+x)/(1+(y/100)^2)))^2) + rnorm(n.rows*n.cols, 0, .10) ...


Only top voted, non community-wiki answers of a minimum length are eligible