Tag Info

Hot answers tagged

20

I've been exploring SciPy's signal.convolve approach (based on this cookbook), and am having some really nice success with the following snippet: from scipy import exp, mgrid, signal, row_stack, column_stack, tile def gaussian_blur(in_array, size): # expand in_array to fit edge of kernel, by repeating edge values ny, nx = in_array.shape ary = ...


12

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 ...


12

There are many algorithms dedicated to building simplification. You may have a look at this website for an overview. See also this question. You could use: Building outline simplification: It consist in recursively deleting too short edges of the outline and lengthening the neighbor edges. Example: Smallest surrounding rectangle algorithm: It consist ...


10

As glennon mentioned, the standard algorithm for doing this is Douglas-Peucker, which is the default algorithm used in software such as PostGIS (i.e. GEOS) via St_Simplify, ArcGIS via Generalize and GRASS via v.generalize. The Wikipedia article also links to a Python implementation. GRASS supports a number of different algorithms, as explained in the help ...


10

In traditional cartography, marker clustering is called aggregation or sometimes amalgamation. It is part of model generalization: When zooming out, some detailed concepts (e.g. the tree) disappear to be replaced by less detailed aggregated forms (e.g. the forest). Many good examples can be found in good cartography books. Here are two examples from this ...


9

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)


8

This sounds like Tom Patterson's work on Resolution Bumping GTOPO 30 in Photoshop. The theory is described well enough to be adaptable to other software, though work needs to be done coming up with the specifics. The basic idea is to generalize (blur) one data set, a lot, to emphasize the general shape and hide specific detail and then blend the hi-res and ...


7

This is a problem that everyone solves with a slight difference. IMHO, Yahoo did a great job with WOEIDs. As far as what is the most efficient way, it seems the answer is too subjective and dependent on your application.


7

Automatic generalization algorithms are not yet a complete solution, they still often make decisions a careful cartographer would abhor. Natural Earth has a good background article on how their approaches to generalizing features, a multi-step manual process. Axpand claims the Swiss Topography Office had an 80% success rate with automatic generalization ...


7

How you'll go about solving this problem really depends on the case, and how important the actual topology is to you (versus just the visuals/rendering time). Since your final goal is to generalize coastlines, you may find some ideas on generalization useful. One approach uses buffering, as seen here. I also had a similar problem a while ago and detailed my ...


7

There's a lot of options and in fact I struggled through the same question a while back on some of my applications. And for our different products we ended up with different solutions. So you have to ask yourself Are all of the singleton icons on the map of the same "kind" - same shape and color? If they're not, do they all live on 1 layer, or multiple ...


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 / ...


6

If you're interested in learning more about this area, the problem is named cartographic displacement, and its one aspect of cartographic generalization. A couple of articles discussing displacement and approaches for handling the problem: Bader, Matthias. 2001. Energy Minimization Methods for Feature Displacement in Map Generalization. Steiniger, S Tefan ...


6

I use the ftools plugin in Quantum most of the time. I also use the v.generalize in GRASS. It has the advantage of giving you several different algortithms options for simplification, smoothing, and network generalization depending on what you are trying to do. http://grass.itc.it/gdp/html_grass64/v.generalize.html


5

You might investigage the Douglas–Peucker algorithm--a method for reducing the number of points in a curve approximated by a series of points. See: http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm Whether you overwrite your original geometry or create a secondary store will vary by use.


5

You might obtain some inspiration from sunflower plots. This method, which has been in use for decades to represent clusters of points on scatterplots, capitalizes on research in visual cognition to produce markers that are rapidly and correctly discriminated as well as clearly related to the sizes of the clusters they represent. Here's an example done in ...


4

geometry ST_SimplifyPreserveTopology(geometry geomA, float tolerance); Will avoid creating derived geometries (polygons in particular) that are invalid http://www.postgis.org/documentation/manual-1.5SVN/ST_SimplifyPreserveTopology.html should be a better output than Simplify check your geometry first and after with ST_IsSimple(geometry geomA);


4

I see "ArcGIS" is a tag, Jakub. Using Spatial Analyst you would simply compute a weighted average of the two hillshades. E.g., the 60-40 mixture could be generated with a calculation like this: (60*[Detailed hillshade] + 40*[Generalized hillshade]) / 100 If you need it, the Gaussian blur can be executed by running a few circular focal means over a ...


4

Good accounts of algorithms in 2 and 3 dimensions appear in the classic text by Preparata & Shamos. Algorithms used in GIS are a specialty of Hanan Samet, who has published several books on the subject. Higher-dimensional searches are usually assisted or sped up by means of preliminary data mining, clustering, or dimension-reducing techniques. This is ...


4

The classic (paleogeographer) answer is to use a K-D tree to store the data in (see http://en.wikipedia.org/wiki/Kd-tree). These work by roughly halving the data in to two partitions in each dimension in turn as you move down the tree. The advantage of them is that as you find the nearest item you can also create a list of nearest items as you go for no ...


4

This is a really interesting question, especially in the context of today where the quest is usually for more detail, higher resolution, etc. To directly answer your question, I think you are performing the exact correct operation. As I see it, the reason for generalizing a layer is to reduce the size and complexity, for performance reasons. This might be ...


4

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 ...


4

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 ...


3

Merging your truck routes data looks complex, and it is maybe not necessary. Another approach could be the following: Retrieve some road network data for your area of interest. Maybe you already have it. Otherwise, you could get openstreetmap data on roads. Link or snap your route data to this network using some basic data matching operations. A simple ...


3

just to follow up on SRG's FME recommendation, the Natural Resources Canada has done a significant amount of work using FME for generalization. They presented at the 2009 FME User Conference, and you can find there talk here http://www.fmeuc.com/archive/fmeuc2009/index.php (it is Talk 2. Generalizing a 1:250 000 National Topographic Map at Natural Resources ...


3

Rupert Brooks of the National Research Council of Canada has some open source gis tools for generalization built for the National Atlas of Canada. They're a bit older, late 1990s and early 2000s, and largely based on ArcInfo workstation though there are a couple of perl and C utilities. I thought I remembered seeing some newer arcgis toolboxes bases on ...


3

The JTS Topology suite has an implementation of the Douglas-Peucker algorithm (though it's not too hard to roll your own for that one); the Net Topology Suite (.net port of JTS) would have the same if you favor the .Net environment. Finally the NTS functions could probably be accessed through SharpMap.


3

If by "simplification", you mean a simple reduction of point number, use a basic filtering algorithm, like Douglass peucker filter. A usefull link for that: http://mapshaper.org/ If by "simplification", you mean obtaining a shape that is more simple, filtering algorithms are not always suitable. More advanced generalisation algorithms should be used. Some ...


3

if your dataset is relatively small or tightly focussed and the end product is a map you might try exporting to a drawing program like Illustrator or Inkscape which have much more developed simplification and generalization tools. If you have deep pockets Avenza Map Publisher provides a two way bridge between ArcMap and Illustrator.


3

You can find it described here: http://www.cgafaq.info/wiki/Minimum_Rectangle_Enclosing_Points Which leads to: http://cgm.cs.mcgill.ca/~orm/maer.html



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