Tag Info

Hot answers tagged

6

I would try the Union tool with NO_GAPS. NO_GAPS —A feature will be created for the areas in the output that are completely enclosed by polygons. This feature will have blank attributes. You can then select the features with blank attributes below a threshold size and calculate their attributes to be the same as the original polygon - or copy/paste ...


4

So, you want to "penetrate" the black background by your transparent polygons to see the lower background. I am not sure that it is possible with MapServer, but I can suggest another trick. You can create a very big polygon covering all your area and even more extended, using any GIS software. Then you can erase your polygons from this area polygon, and ...


4

One solution could be this one: 1) Calculate a triangulation of the whole area. 2) For each triangle, test if inclusion of neighbouring triangles retains the convexity. If more than 1, pick the neighbour, that adds the most to the area. Run the test again with a new set of neighbouring triangles. I don't know if this will actually find the largest ICH, ...


3

you should be carefull that python is case sensitive. There is also no indentation to define your "for" loop, but I guess you have it in your code. Try this : import arcpy from arcpy import env from arcpy.sa import * arcpy.env.workspace = (r“Workspace/Path”) for i in range (31): outFill = Fill(“raster_name”+str(i)+“.tif”) outFill.save ...


3

This is a comment but could be considered partial progress towards a solution insofar as it might steer the conversation away from a suboptimal technique. A greedy algorithm based on a triangulation will not always work. As a counterexample, consider the collection of red and blue points in this figure: A partial triangulation is shown: extend it in any ...


3

PolyGeo's solution is one I have employed myself and works well (+1). Another alternative is to buffer your polygons by a small amount and then de-buffer the result by the same amount (say +1m and then -1m). This also works well but carries a small risk of accidentally joining polygons that neighbour by the same amount as your buffer. It can also increase ...


3

ok, i think i found the trick! after you gave me your data sample set, my first thought was: What a crap! ;) Your sample consists of 71 single lines, which partly overlap and have some tiny offsets as well. i guessed that GRASS would be the way to go, and ... tada .. it is so, this is your line data labeled with its feature ids. If you know how to do it, ...


2

One what that works fairly well is to buffer the feature(s) by distance x (approximately half of the largest 'inlet' you wish to fill) then inverse buffer the result to get back to the initial boundary. Another option would be to use something like a 'grow' command on the raster before you convert to vector.


2

I have an idea how you you iteratively work from large blocks down to smaller blocks using FME (by Safe Software.) For the record I don't work for them but seem to praise their tool enough... Use "BoundingBoxReplacer" on the area of interest. Reproject it to a local coordinate system (for later when you need to "tile" in feet/meters.) Buffer the lines with ...


2

I will only cover the part, already having "bad" polygons: My workflow for cleaning up polygons and gaps which works quite conveniently is importing it into GRASS through the GRASS-plugin in QGIS. The concept/process of creating a mapset and a location is confusing for novices, and you might have to websearch for guidance, but the result might be worth it. ...


2

Mapserver has recently introduced the concept of mask layers (a mask behaves quite like a mask in Photoshop by blending with the layer it is applied to). The RFC describes what they do and how they can be used. By reading your answer it seems like you could use a mask layer to obtain the 'keyhole' effect you are looking for. I am not sure if this feature ...


2

Here's another way to remove lakes from polygons (like the zip code map layer from Navteq). This is also useful to clean up territory map layers that have been generated by dissolving the zip code map layer by the territory code. Use a Geoprocessing "Union" on the polygon map layer and remove the checkbox for “Gaps Allowed” (which is checked by default.) ...


2

Vince's comments led me to look again at Shapely in Python, and it can do it. In short, the method I used was: get the bounding box of the page/object you want calculate the diagonal of this box, as this will be the minimum length your hatch lines need to be draw a square array of horizontal lines centred on the bounding box's centre, each spaced suitably ...


2

This issue is known and reported in the upstream issue tracker. There is no known workaround yet. If you would like to solve this, please add information in the bugtracker consider implementing a patch and creating a pull request or hire/contract a developer to implement this fix


1

New to Python is a good thing! A couple more tips: "from arcpy.sa import *" will lead to name collision problems sooner or later. So do "from arcpy import sa" and then call "sa.Fill()". You can also make your program insensitive to the number of files by doing this: import glob from arcpy import sa arcpy.env.workspace = (r“Workspace/Path”) for filename in ...


1

I suspect your problem is similar to what I encountered here: Filled Polygons on the Edge of a Map - ArcMap 10.1 Try running the "Repair Geometry" tool on your polygon layers, especially the layer that is not the buildigs (2e Daaise buurt).


1

Below is a sample image showing a transparent mask layer. If you make the mask much bigger, then your user's won't notice the outer edges. Similar to what @nadya suggested, you can: Create a large rectangular polygon Create polygons for each of the "cut-outs" Subtract the smaller polygons from the bigger one (the Difference tool in QGIS works nicely for ...


1

I had these lines in my .map file and the transparency lower than 100 was working. LAYER NAME core_areas DATA core_areas.shp STATUS ON TYPE POLYGON TRANSPARENCY 100 SIZEUNITS pixels PROJECTION "init=epsg:32629" END # projection CLASS STYLE COLOR 20 150 90 ...



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