Hot answers tagged

17

If you'r familiar with QGIS: In the QGIS trunk 1.9 (can be installed as qgis.dev via the OSGEO installer, see qgis homepage) is a new function in the vector menu called "Eliminate sliver polygons", which exactly does what you want. You can select the problematic polygons and merge them to adjacent polygons based on a common boundary or area propotion. Try it ...


10

I think the Integrate tool from the Data Management toolbox should solve this - you can set a tolerance and it will align and remove any slivers from two polygons. ArcGIS Integrate tool help


10

The thing you are looking at is a sliver geometry. Similar to @sgillies's answer, except use a few buffer parameters to control the chiselled geometry shape: import json from shapely.geometry import shape, JOIN_STYLE eps = 0.001 # epsilon that is approx. the width of slivers, e.g. 1 mm # Load the original polygon from GeoJSON poly = shape(json.loads('{"...


9

Instead of area/perimeter, it is better to use the area divided by the square of the perimeter (or its inverse). This is also called "shape index". The square of the perimeter divided by the area has a minimum value of 4*Pi() (in the case of a disk, which is the most compact 2D geometry), so it can be normalized by 4*Pi() for an easy interpretation (...


7

There is an "Eliminate sliver polygons" function in QGIS 2.12 (Lyon) Toolbox. I am sure it is also in some earlier version.


5

Try dilating and eroding by a small factor (eps). geom.buffer(eps).buffer(-eps)


5

if you have access to Safe Fme tools you will find useful the transformer called spikeRemover, give it a look. You may try a downloadable limited version of SAFE FME or check your ArcGis license for "FME Extension for ArcGIS" http://docs.safe.com/fme/html/FME_Transformers/Default.htm#Transformers/spikeremover.htm http://cdn.safe.com/resources/fme/FME-...


5

If you have the "advanced" licence, this is something that the "eliminate" tool does. But from a cut you could have multipart polygons, which are more difficult to manage. Therefore you should first use "multipart to single part", then select the small polygons (select by location all polygons touching the one you used for cutting, then use a size threshold)....


5

Ok I found an answer: You can avoid to get rounded corner by adding the parameter 'join=mitre' to st_buffer: So it work perfectly fine with: SELECT st_buffer(st_buffer(geom,1,'join=mitre'),-1,'join=mitre') FROM mygeotable; EDIT If the buffer is too large st_buffer(geom,10,'join=mitre') produce from time to time some strange results (the polygones become ...


5

It seems that the solution lies in setting the smoothFactor argument in AddPolygons to 0, as suggested in this related post: Leaflet geojson styling leaves gaps between polygon I also found it necessary to add a small stroke to the polygons in order to completely remove the sliver gaps from the example map. leaflet() %>% addProviderTiles("CartoDB....


5

One option would be to use the ratio of the area of the polygon to the longest line that can be drawn using its extremities. Identifying long narrow polygons. select * from polygons where ST_Length(ST_LongestLine(geom, geom)) < ST_Area(geom) * 4 This works pretty well for sliver polygons. You can adjust what the ratio (what you multiply the area with) ...


5

I would try to create a negative buffer, if it eats thin polygons, then it’s good, if it doesn’t eat the polygon, then it’s mine ... :-) run this script, having previously set 2/3 of the width of the linear polygons ... create table name_table as SELECT ST_Buffer( (ST_Dump( (ST_Union( ST_Buffer( (geom),-0.0001))))).geom, 0.0001)) as geom from source_table ...


5

In QGIS 3.4, it is under Processing toolbox -> Vector geometry with a new name Eliminate Selected Polygons There is additional option is to eliminate based on the Smallest polygon area in addition to the previously available options which are Largest polygon area and Largest common boundary


4

Here is the definition from Esri: sliver polygon: [data models] A small, narrow, polygon feature that appears along the borders of polygons following the overlay of two or more geographic datasets. Sliver polygons may indicate topology problems with the source polygon features, or they may be a legitimate result of the overlay. and from Wikipedia ...


3

There are two options for you: Using Advanced Editing Using Buffers and Geometric Differences Advanced Editing ArcGIS in 10.3+ can align features to each other. Specifically in your case the Align To Shape tool found in the Advanced Editing Toolbar. As I've not got access to 10.3 at the moment I can't test this any further or determine it's suitability ...


3

This method I have used before to great success to remove all voids (holes) in polygons - requires an Advanced (ArcInfo) license: Get your attributed points using Feature to Point with the INSIDE option (important) voids will not create a point (or at least should not) check for unattributed points just to be sure. Export your bounding lines using Polygon ...


3

Based on the image you've provided, it looks like this might be a raster that was originally relatively coarse that was resampled to a much higher resolution. I'm not sure exactly how the no data slivers occurred, but you might try resampling it back to a coarser resolution (try to approximate what the minimum cell size should be by visually inspecting your ...


3

I solved it myself. After unioning the layers, the silver polygons were added as a single polygon. Therefore I had to use the Explode Multi-part Feature tool from advanced editing toolbar, which separated the polygon into multiple single polygons. Then the Elimination tool was able to add the polygons to neighboring polygons easily.


2

Well, I've been using a PostGIS function (I use on my QGIS directly) that executes a recursive snap to solve this problem. The results are quite good, it just demand a good joice of tolerance values to get best results. If you are willing to try, check it (in my case the geometries are all multi, hence the st_multi in my execute): CREATE OR REPLACE FUNCTION ...


2

I'm not sure where your problem occurs, or where you have the possibility to avoid/fix it. But I've seen this a lot in our SDE-database although geometries in SDE should always be correct. In our case it was because we imported shapefiles using ArcObjects into the SDE. When the geometries was stored they snapped to the grid of the SDE and thus created ...


2

With arcmap 9.3.1, I would add a field called Flag (or maybe FlagFlag?) and use VBA code in the field calculator to calculate this field. The VBA code would dim a variable as ITopologicalOperator3 and set it to the Shape field. It would then call the not-so-simple IsSimpleEx method. Set the Flag field value to the esriNonSimpleEnum. Presumably the error ...


2

After banging my head on the wall for a while, I figured it out. First, I used reclassify in spatial analyst to change the values for the slivers to a unique value (99). Then I used Hawth's Tools' raster tool called "spatial replace" to replace values of 99 with the value representing the mean of the neighborhood.


2

The Integrate tool will fix small gaps in the data, but be very very very careful when using this tool on SDE data it will overwrite the existing features in the dataset with no undo. To use this tool properly: Backup your SDE data: either as XML workspace document, Geodatabase feature class (file or personal - use copy/paste), Shapefile or your current ...


2

As @Kazuhito suggested the 'Eliminate Sliver Polygons' is the tool to use in this scenario. The tricky part is determining your cutoff point for feature removal. You will want to calculate the area for all the features in the layer. Using the area calculated find the value at which you would classify a feature as an "island"(sliver). In the 'Eliminate Sliver ...


2

If ST_Difference doesn't get you where you want try a ratio of area and perimeter by making new attribute fields and calculating. You will have to make a judgement call where to set the ratio filter and if the method is suitable enough for the analysis purpose. ^ I'd rather this be a comment over an answer but my user is too new to comment.


2

Check out the Integrate tool it will make features coincident if they are within a specified distance: Maintains the integrity of shared feature boundaries by making features coincident if they fall within the specified x,y tolerance. Features that fall within the specified x,y tolerance are considered identical or coincident.


1

If you DON'T have the "advanced" licence, there is a workaround but it will not be exactly the same result. It starts the same way : From a cut you could have multipart polygons, which are more difficult to manage. Therefore you should first use "multipart to single part", then select the small polygons (select by location all polygons touching the one you ...


1

You might be able to do this in R with the rmapshaper package, more specifically the ms_simplify function. The best tool I've actually used for this is pprepair, which is a standalone C program, gettable from github: https://github.com/tudelft3d/pprepair


1

Here's some code that should work with your text file. You'll need to update the first three variables (textFl, outPath, outName). The script creates a new feature class, and then iterates through the text file and looks for lines with coordinates. It adds those coordinates to a list until a line doesn't have coordinates. It then creates a polygon feature ...


1

The idea behind the thinness ratio is that once known the perimeter of the unknown shape if the shape is similar to a circle the measured area should be equal to the theoretical area of a circle with the circumference equal to the perimeter of the unknown shape. Knowing that the area of the circle is pi*r**2 and that the perimeter p is 2*pi*r hence r = p /...


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