I've been exploring SciPy's signal.convolve approach (based on this cookbook), and am having some really nice success with the following snippet:
import numpy as np
from scipy.signal import fftconvolve
def gaussian_blur(in_array, size):
# expand in_array to fit edge of kernel
padded_array = np.pad(in_array, size, 'symmetric')
# build kernel
Most methods to spline sequences of numbers will spline polygons. The trick is to make the splines "close up" smoothly at the endpoints. To do this, "wrap" the vertices around the ends. Then spline the x- and y-coordinates separately.
Here is a working example in R. It uses the default cubic spline procedure available in the basic statistics package. ...
Gaussian blur is just a weighted focal mean. You can recreate it to high accuracy with a sequence of short-distance circular neighborhood (unweighted) means: this is an application of the Central Limit Theorem.
You have a lot of choices. "Filter" is too limited--it's only for 3 x 3 neighborhoods--so don't bother with it. The best option for large DEMs is ...
you can use:
Vector menu -> Geometry tools -> Simplify Geometries
Beside this you can use Douglas-Peucker algorithm in postgis too, so you can use in postgis then adding postgis layer to qgis. you can find some info here about Simplify: Reduce the weight of a geometry.
SELECT simplify(the_geom,500) as simpgeom
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 ...
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 &...
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, ...
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 ...
Here are some ideas.
With base plot you can do
You can also resample your data
y <- disaggregate(x, 5, method='bilinear')
Or indeed smooth it using a focal operation
y <- focal(x, w=matrix(1, 5, 5), mean)
Or a combination
y <- disaggregate(x, 5)
y <- focal(y, w=matrix(1, 5, 5), mean)
The question whether ...
You could try merging the rasters into one:
From the toolbar:
Raster > Miscellaneous> Merge
From the Processing Toolbox:
GDAL/OGR > Miscellaneous > Merge
From the GDAL console:
gdal_merge.py -o merged.tif input1.tif input2.tif
Or build a virtual raster:
Raster > Miscellaneous> Build Virtual Raster
The best way is to first convert your polygon to lines using polygonToLines (NOT feature to line) so that you have a single line shared by 2 polygones. Then you can smooth your lines and convert them back to polygons. If you need to keep the attribute table, create center point (INSIDE) for your original polygons and use those when you convert back to ...
I created a small, naive script which converts input LineStrings to CompoundCurves based on some heuristics.
What it does:
Cuts down sharp corners to create a visually more appealing results than the original data.
Uses plpgsql. No additional extensions required.
Accepts an optional "smoothing factor" between 0 and 100 besides a geometry.
What it doesn't ...
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
I came across a thread Smoothing a 2-D figure. The answers make reference to this paper Chaikin's algorithm for curves
For a given polygon with vertices as P0, P1, ...P(N-1), the corner cutting algorithm will generate 2 new vertices for each line segment defined by P(i) and P(i+1) as
Q(i) = (3/4)P(i) + (1/4)P(i+1)
R(i) = (1/4)P(i) + (3/4)P(i+1)
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 ...
The smoothing is actually a part of every hydrological analysis in gis (and in arcgis as well). The tool you may want to use is fill. This tool fills sinks and remove peaks, adding functionalities such as the z-limit factor. Shortly, z-limit allow to keep sinks / peaks that exceeds the parameter's value.
Before answering your ultimate question, there are a couple of other points in your statement worth looking at.
It shows harsh boundaries where one CT has great access to transit and
right beside that CT is one that has extremely poor access
In your comment, you elaborated that these vector boundaries are Census Tracts. What I am taking from your ...
For visualisation purpose, you can select a resampling method from the display properties. right click on layer > properties, then display tab / resampling during display using : cubic convolution (cubic convolution yields the smoothest display, bilinear interpolation also works).
here is an example with a S2 image, with cubic convolution (top) and ...
Simplifying and smoothing operations are related to the QgsGeometry() Class: this means that you can run them when dealing with the geometry of the current feature.
As far as I know, the Simplify geometries algorithm literally simplifies the current geometry by reducing the number of vertices on the basis of a tolerance value (so, there isn't any particular ...
This effect could be a consequence of having different point densities within the flight line overlap regions. A possible solution would be to homogenize the LiDAR cloud.
With Fusion the command line to accomplish such task is ThinData:
ThinData allows you to thin LIDAR data to specific pulse densities. This capability is useful when comparing analysis ...
We recently stubled across this issue as well and it is documented here: The merged LiDAR shows the trouble you report. The reason is that one flightline is much brighter than the other flightline so that the LiDAR points cannot simply be merged and have their intensity processed together. In the same flightline you also notice the negative effects of clouds ...
Rather than looking for a specific package for raster time series you could look for functions for smoothing, and then use these with the calc function in the raster package. Here is an example for Savitzky-Golay:
If you use shapely, you can try the simplify(tolerance) method on LineString objects, which is based on the Ramer–Douglas–Peucker algorithm.
It's more of a simplifying algorithm than a smoothing one; but sometimes simpler linestrings happen to be smoother. Give it a try.
Similar to what @WhiteboxDev suggested, another filter type that could be used is a sieve filter. Instead of looking at whether the 0s or 1s "win" for a given region, it looks at the number of neighbours a given pixel has, that matches its starting value, and chains those neighbours together.
For example, the following case:
0 0 0
1 1 1
0 0 0
With a ...
In addition to the use of a majority filter, there is another alternative approach that I will list below. This approach is more involved than simply filtering the raster and should only be used when it is important that the polygons retain their original shape and you are only concerned with reducing the overall number of polygon features. This approach ...
Following up on the Comment by @whuber, the Majority Filter (Spatial Analyst) documentation says (with my bolding):
The input raster to be filtered based on the the majority of
contiguous neighboring cells.
It must be of integer type.
You have to choose GRASS commands -> v.generalize. In parameters you need to choose Input polygon and one of the simplifications methods. Personaly I prefer snakes because it creates very nice smoothed border.