New answers tagged

0

Your polygon seems to be two copies of the same ring, exactly overlapping. Look at the first five points and then the first five after the half-way mark: > polygons[1:5,] x y n 288842 4.232 20.240 5 288851 4.232 20.248 5 288861 4.232 20.256 5 288871 4.224 20.264 5 288881 4.224 20.272 5 > polygons[(nrow(polygons)/2)+(1:5),] x ...


0

Wouldn't you want a concave hull? A convex hull will give you a large amount of area that isn't part of the block. For example, a convex hull would fill in that big gap in the "hook" park of block 1.


1

If you just want to hide points for visual purposes and don't want to create a new shapefile: Follow the instructions in ahmadhanb's answer to select all points which intersect your polygon. Open field calculator for of your point layer. Ensure the 'Only update xx selected features' box is ticked. Create a new field named "Filter". Field type can be integer....


2

To keep only the points that are in the green layer, find the Select by location tool in the Processing Toolbox. Use the Select by location tool with the following settings: Select features from point layer Where the features (geometry predicate) intersect By comparing to the features from polygon layer Now you have selected all the points that fall inside ...


0

Or using the new Qgis plugin designed for that: ThRasE Disclosure: I developed this plugin, and I don't want to promote it, I just want to share another option


4

I am not sure how did you rotate the polygon grid, but it seems you have used Rotate tool from Processing toolbox. If so, you need to specify the Rotation anchor [x,y], which enables you to select the rotation position directly from the map canvas, as you can see below: Before rotation: Using Rotate tool: The Rotation anchor [x,y] was selected at the ...


1

In the Rasterize tool, notice the option to set a nodata value: Assign a specified nodata value to output bands [optional] You have 0.000000 set as the optional nodata value, so all polygons with 0 in their burnin field are converted to nodata values in the raster. Clear the nodata value by clicking the X button in the nodata box:


0

Here is one way to do it (the simplified way ) : let's suppose that in each shapefile you have a unique column called index, if you don't you can create it by reindexing the DataFrame lines.reset_index(inplace = True) grids.reset_index(inplace = True) 1 - first apply a spatial join between both of your shapefiles, with operation within to avoid extreme ...


0

Problem solved using the Situation Awareness widget. The way I solved it was just to add the Situation Awareness widget to the ArcGIS Portal web app and link up the layers, and fields. So useful summaries were returned inside the area of interest drawn.


5

just copy these two .dlls ("libeay32.dll" and "ssleay32.dll") from bin/postgisgui folder and paste them in bin folder.


3

So this worked for me but no promises because I don't really know what I did I just followed some stuff I found else where. Now I'm on win 10 installing PostgreSQL 11.5 and postgis 2.5 (installed through the native application stack builder) all 64bit and I just did a new install of them all. Then I followed the instructions here and copped the dll files "...


7

In QGIS, this feature is called Topological Editing. In the Snapping Toolbar, enable topological editing. With topological editing enabled, when you use the Vertex Tool to move a vertex on one polygon, the same vertex on an adjacent polygon will also be moved, thus keeping the shared boundary.


2

Try v.edit: Edits a vector map, allows adding, deleting and modifying selected vector features. With tool snap and a threshold distance: I had to set output type area under Advanced parameters to get it to run


0

Make a grid by extending the bounds of your points out by half a cell size in all directions: > cellsize = 0.5 > g2 = st_make_grid( st_as_sfc( st_bbox(points) + c(-cellsize/2, -cellsize/2, cellsize/2, cellsize/2)), what="polygons", cellsize=cellsize) Then your points are at the centres of ...


1

The simpliest way I think is to use boundary method in Shapely lib. When using from shapely.geometry import Polygon, MultiPolygon Polygon(feature['geometry']['coordinates'][0]).boundary it returns LINESTRING (30.916671 55.61667, 31.166671 56.91667, 32.550004 57.350003,...) In case Multipolygon it obviously returns Multilinestring: multy = MultiPolygon([...


2

I would recommend these steps: Create polygon centroids for your municipality features. Next use "join attributes by location" to give these new centroids all a new attribute that is the climate zone. Then join this centroid layer to your original municipality polygons by a unique ID only including the new climate zone though. (Optional): Create a new ...


0

ArcGIS's Spatial Analyst toolset has Spatial Auto-correlation tool Measures spatial autocorrelation based on feature locations and attribute values using the Global Moran's I statistic. Multi-Distance Spatial Cluster Analysis (Ripley's K Function) Determines whether features, or the values associated with features, exhibit statistically significant ...


0

I created a graphical model for QGIS 3.8 to create the blue dotted "cutting" lines from your picture. Only thing you need is a point layer with an integer field called ID, where your points are sorted ascending. Of course you can (or must) adjust this model to your specific needs. As I cannot attach it here, I added it to my GitHub repository. I've done this ...


0

The 'Fix Geometries' tool is magical, this is my usual first step for fixing problems like this. It's in the Processing Toolbox under Vector Geometry. Run it on the original 270 polygons and then try dissolving them and see if that works. If that doesn't work try the Check Validity tool under Vector > Geometry Tools. Again run this on the original 270. This ...


1

Tested on QGIS 2.18 and QGIS 3.4 I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer... Let's assume we have ten features in "multiple_polygons" (yellow), and three in "catchment_zones" (grey) accordingly, see image below. With the following Query, it is possible to achieve the result SELECT c.geometry, c.id, c....


1

Intersect Dissolve based on catchment ID Create new field and calculate area


1

Based on @kazuhito's answer I put together a single, hacky expression in the QGIS Field Calculator that should do the same thing in one step. However I can imagine this will be very resource-intensive on larger datasets. I think the problem is best suited to a Python implementation, which obviously handles referencing and iteration far better than the Field ...


1

Best approach in QGIS to do that (considering thousands of polygons to be "projected" on a reference line) is determining the bounding box rotated by the angle between reference line and X axis. This angle is easily determined by using Extract vertices tool (in the QGIS Processing Toolbox -> Vector geometry) for reference line. From the example of following ...


6

Using QGIS: (1) Create point layer of the polygon vertices using Extract vertices tool (in the QGIS Processing Toolbox > Vector geometry). (2) Open the attribute table of the newly created Vertices layer. (3) Start the Field Calculator and; (3A) Create a new field, let's call it min_poly to store the minimum distance and give an expression: minimum( ...


3

I don't know how to do it with QGIS or ArcGIS but what you want feels like a width of an oriented bounding box. As a proof of concept I rotated your sample image so that the projection line is horizontal. Then I digitized the polygons from the image and generated envelopes for them. Width of the envelope answers your question. What is missing is a tool ...


0

I would use a vector mask or shapefile if the raster image is geospatially defined as part of a map especially if the raster is georeferenced in world coordinates (lat,lon, WGS1984, etc so forth) simply because it's easier for me to take a polygon of let's say Denver, Colorado where I live and extract satellite data using that polygon either via clip or mask....


0

I have got the answer for my question today as: var district = ee.FeatureCollection('ft:1PA2zwArj8EsplrX9eMxJ2H_TICyyx855KPnbJhC1','geometry') .filter(ee.Filter.eq('name','Begusarai')); var boundbox = district.geometry().bounds(); Map.centerObject(bbox); Map.addLayer(bbox); Map.addLayer(geometry, {color: 'red'}); print(district); // return the list of ...


3

the polygon layer is below OpenStreetMap. A new polygon being edited is always on top of everything. As soon as you finish the drawing, the polygon is "moved" to its layer, and since OSM is above it you just can't see it. Move the layer above OSM and you will see all the polygons


4

You can't split "features" because there is only one feature in your polygon. So, I used QuickWKT QGIS plugin to visualize that complete polygon: Near at bottom, there are several artifacts, however, three of them are holes (not features). They can be eliminated with "Delete Ring" tool from Advanced Digitizing Toolbar (see following image). Left ...


-1

Follow this link to download the file with the * .shp resolution with the name poly and use it in your work, I fixed the sidebar at the bottom of the polygon. https://drive.google.com/file/d/1dyF69pgxOZMuNCrHOY9Zz_aWj9unLSsI/view?usp=sharing


2

The below steps were tested in QGIS 3.8 and assumes your coordinates are already correctly ordered: Add CSV table to QGIS Use Processing | Vector Creation | Create Points layer from table Use Processing | Vector Creation | Points to path Use Processing | Vector Geometry | Lines to polygons


2

If you take a look at Leaflet docs about creating GeoJSON layer (which you should), you will see there is style option by which you can set dynamic styling function, which can set feature style depending on feature properties. That's exactly what is done in Leaflet choropleth example, where GeoJSON layer is created with dynamic style, exactly as you want: ...


2

You can use the Spatial Join tool with the points as the target features and the polygons as the join features. You should leave the keep all target features option checked if you want to include all points in the output, even if some fall outside of any of the polygons. If you want the output to include the polygon object ID in a JoinFID field you should ...


1

Your code is perfect. I think you are not working in a projection in meters e.g mollweide. All you need to do is reproject the layer to -- +proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m no_defs Then run the code again and it would be 100%


0

First, I had a CORS error getting the GeoJSON from the link to my map. So I hit the link and copy/pasted the date into a file called poly1.json and put this in the same folder as my page. It works. But the data source is now static not dynamic. Your making it look difficult, try this code: <!DOCTYPE html> <html> <head> <title>...


0

In the "Primary Symbology" pane, select the "Symbol Layer Drawing button"(at the top of the pane, looks kind of like a #). There, you click the switch to enable and you can change the order your symbology draws in.


1

The method I use for linking VIIRS lighting data to vector areas is as follows (assumes QGIS3): Make sure both the raster and vector layers are in the same CRS. Run the centroids tool on the vector layer (Menu > Vector > Geometry Tools > Centroids) Convert the lighting raster data to a vector point layer (Processing Sidebar > Vector Creation > Vectorize) ...


Top 50 recent answers are included