Hot answers tagged

5

@Caleb if you use the Spatial Join (Analysis) tool, you can click on fields that pop up in the 'Field Map of Join Features (optional)' portion of the tool window. While a field is highlighted, click on the 'X' to the right and it will delete from view (and therefor not show up in your Join output feature class). Also, you can set join rules for certain ...


4

The function you are looking for is actually getFeature (at least in QGIS 2.8). It takes 3 arguments (hence your "Parsing Error") : the name of the layer, the name of the field, and the value of the field. So it would be something like getFeature( 'your_layer', 'id', 6679 ). Additionnal point : you actually have to use geometry(getFeature( ... )) in your ...


4

Taking into account your trouble with vector solution I suggest using approximate raster based technique. I’ll use ArcGIS (no QGIS) but most likely there are same tools in QGIS Dissolve your polygons and convert them to polylines. Calculate Euclidean distance to lines using small cell size. The smaller it is, the more accurate result can be achieved. Clip ...


4

You don't mention Python, arcpy, or any coding in your tags, so I would assume that you're limited to working in ArcMap; is that correct? I have a Python/ArcPy function that creates Thiessen polygons on the vertices of each polygon, which mostly yields the results that you're looking for. The steps are basically: 1) Delete all extraneous fields (as step 3 ...


3

You can do this fairly easily using the symbol selector options, however it will need to be done for each symbol you want to change - it can't be done as part of the color ramp. Click on Edit Symbol... Click Add Layer Move the new layer down below the 10% hatch layer Change the symbol properties Type for this new layer to be Simple Fill Symbol, and ...


3

If these are in the same layer this is pretty straigtforward. Simply tick the "Topological Editing" box in your snapping options. Then if the two polygons share a node, this node will be moved in both polygons.


3

You can do this quite easily with base graphics, I don't see a real need for spplot or ggplot: Sample data: Spain and a random raster: require(raster) es = getData("GADM", country="ESP",level=1) es =es[-14,] # drop canary islands r = raster(extent(es),ncol=200,nrow=200) r[]=runif(200*200) Plot the raster and add the polygons - the alternative clips the ...


3

I would use Spatial Join GP tool for this. Target features: study areas (green solid polys); Join features: tracts (red color) Choose JOIN_ONE_TO_MANY. All other options - default. This is what you will get: Study area 3 (TARGET_FID field) intersects tracts 9 and 36 (JOIN_FID field). Study area 4 doesn't intersect any, hence JOIN_FID = -1. In case ...


3

Use the MMQGIS plugin to Combine -> Merge Layers, selecting your two polyline layers A and B as the inputs, and save the output as Layer C. Then use Vector -> Geometry Tools -> Lines to Polygons on Layer C and you will have your inner boundaries as polygons.


3

Apologies for a solution using a different set of technologies, but this is something that is very well suited for SQL. A series of self-joins can be used to find nearest neighbors. Example below is using PostgreSQL and PostGIS using New Jersey municipality data. WITH camden AS ( SELECT shape FROM municipalities WHERE mun = 'CAMDEN CITY' ) SELECT ...


3

You need to identify information about digitizing polygons if you insist on digitizing this yourself. It could be as easy as digitizing the outer polygon and then using the "Split" tool to split that polygon multiple times. In an edit session, with an existing polygon, the split tool can be used to split the tool into 2 equal parts. You have to start and ...


3

Right...it seems that there might be an issue with QGIS 2.12.0 (and QGIS 2.10.1) not processing your shapefiles correctly. I ran the clip tool in QGIS 2.8.2 and it seems to have worked (atleast for the area you have highlighted in your question): The clipped layer using QGIS 2.10.1 and 2.12.0 (shown in red): The clipped layer using QGIS 2.8.2 (shown ...


3

Just to add to the already given great answers, you could also use the Select by location tool from the Processing Toolbox to give you more options on how you want to select your objects:


2

You can speed up the manual clean up process a bit by creating a virtual field on your final layer and populating it with the area of each feature ($area in field calculator). Then sort the attribute table by this field. You will probable find lots of records at the top with zero or close to zero areas, and these can be deleted quickly from within the ...


2

You do not need a plugin for this. The "Advanced Digitizing Panel" allows for entering distances and angles relative to the currently drawn path or relative to other objects on the map canvas. There can also find videos with instructions.


2

I don't work with QGIS, but I have had similar problems with ArcMap. Something simple I tend to forget...Make sure you have no attributes selected when running the tool. I added your data...everything looks fine


2

In QGIS merge the two polyline layers into one polyline shape file. Use the GRASS plug-in to create polygons from borders, unfortunately GRASS plug-in is not available in QGIS 2.8, so upgrade to QGIS 2.12 or use standalone GRASS (I give the GRASS command name in brackets): Create a new GRASS location Import the shape file into GRASS(v.in.ogr) Convert ...


2

If you have an Advanced license, you might try the Eliminate Tool, in Data Management, Generalization. Here is the tool description, "Eliminates polygons by merging them with neighboring polygons that have the largest area or the longest shared border."


1

but this is will not provide me the order and how many times municipalities are crossed. Assuming every row in Rivers table is a linestring with an entire river. Here's a query that will get you how many municipalities are crossed, the subquery t , will get you all the municipalities that each river crosses but yes they will not be in any guaranteed ...


1

If you want to stick with spplot, you could e.g. use layer from latticeExtra to add 'Spatial*' objects to an existing plot. Based on the code provided by @Spacedman, this would look as follows. ## load package library(latticeExtra) ## plot raster and add polygons spplot(r, scales = list(draw = TRUE), col.regions = terrain.colors(100), at = seq(0, ...


1

When asking a question please show some of the code you have been using. In fact, you should try to create a self-contained reproducible example (there are many examples on how to that on this website). Otherwise it is almost impossible to help you. I am guessing that you are using the rasterize function from the raster package. The grid cells are rather ...


1

Ideally, you should be using GeoJSON rather than your own arbitrary JSON. Then, take your Polygon geometries and create Multipolygon geometries—perhaps using the union capability of turf.js. This way, simple polygons that are in fact disconnected parts of the same multipolygon are linked. You can also do this upfront, but it's not clear how you are getting ...


1

EDIT: there is actually a simpler answer. Compute the intersection between your two layers (Vector > Geoprocessing tools > Intersect), then use the Group Stats plugin to compute statistics on the constituencies. You can even compute the total area of Natura 2000 sites per constituency. Minor issue: it will only take into account Natura 2000 sites that ...


1

I think you're asking the same thing here as in your other question How to combine two polyline shapefile together. See my answer to that question.


1

You may use Zonal Histogram. As Input raster of feature zone data, specify your polygon(s). As Input value raster, the land quality raster. The output table will show each land quality class as a row, each polygon class as a column. Thus if you have more than one polygon, you may want to group them into classes beforehand, using a unique value for each class ...


1

Your answer, actually helped, but I didn't find a way to get feature by feature id. So I created new field ID containing feature id, expression is simple: @row_number And then solved my task distance(centroid($geometry), centroid(geometry(getFeature(@layer_name, 'ID', 6609)))) Thanks!


1

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() %>% ...


1

This seems like something that could be done much easier than the answers submitted. I would use a simple python script personally: floodName = "the layer name here" boundryName = "the layer name here" fieldName = "the name of the field to contain the output 1/0" minCoverage = 0.5 # the minimum amount of area covered to write 1 updateMap = [] # this will ...



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