Hot answers tagged

7

You get the error because you pass a list for the first parameter. Instead, use the tool in for loop with path of the file. import arcpy import os arcpy.env.overwriteOutput = True input_path = "G:\\Python\\Arcgis\\Materials\\" output_path = "G:\\Python\\Arcgis\\Buffer\\" shapelist = os.listdir(input_path) shapelist = [x for x in ...


5

As I mentioned in the comments, your post here is bit difficult to work through; and to me, it's doing what I'm expecting: namely, buffering a point (-120, 40) by 10 results in the appropriately sized Polygon form (-130 to -110, 30 to 50). However, I think I understand what your confusion is. You're setting the coordinate system here: elines = elines.set_crs(...


4

Your polygon isn't valid - it has (at least) a self-intersection in the top right corner: > gIsValid(field_bndry) [1] FALSE Warning message: In RGEOSUnaryPredFunc(spgeom, byid, "rgeos_isvalid") : Self-intersection at or near point -95.517755208090747 42.0119499413616 This means GEOS' idea of what's the inside and what's the outside is unclear,...


3

There are two sets of classes for spatial data in R, and you are mixing them. They do not mix. The sp package provides the classes that start Spatial...., such as your SpatialPointsDataFrame. Then the sf package provides different classes for the same sort of data, and these are usually called "sf classes" or "spatial data frames". You ...


3

You can use a simple query in DB Manager, like: SELECT bldg.* , count(quakes.id) FROM "New Scratch Layer" AS bldg, Buffered AS quakes WHERE st_intersects(quakes.geometry,bldg.geometry) GROUP BY bldg.ID Then Load it as a layer in the DB Manager (at the bottom) and style it to show by number of quakes. The attribute table will have the counts. INPUT ...


3

The Vector - Geoprocessing Tools - Buffer tool in QGIS is applied to all features in a layer. Buffered features can also be dissolved, so that overlapping buffers are not created, if required. This reduces the number of features in the output. The number of items in the attribute table will reflect this.


2

If any kind of polygon, not just rectangles, is OK for you, than the easiest way is to simply create voronoi polygons, using Menu Vector / Geometry Tools / Voronoi polygons. See this example, based on the points you provided in your question, including a value of 20 for Buffer region (% of extent): You could also apply Menu Processing / Toolbox / Oriented ...


2

Following code prints in your csv table the coordinates of centroids as centroid_x, centroid_y (one column for each coordinate). I hope this helps. // set of points var pointList= ee.List( [[-133.49345223488783, 28.4392489430013], [-134.28446785988783, 27.273691218174367], [-135.73466317238783, 27.351783369494303]]); // turn them ...


2

In the next-to-last line of your code you use "set_crs" which tells the dataset it is in some crs; it doesn't actually transform the data. To do that, you need to use "to_crs". I have no idea if the rest of your code is right as you don't provide the context.


1

Not an answer, but, on 3.18, I see much the same thing. With some labels, I can just see the underlying map through the buffer when multiplying. On others, I can see them on one side of the label buffer, but not the other. But the Blend Mode seems to be almost ignored. Turning off the mask gives results like yours (with a big buffer and soft light). So, no ...


1

Instead of the "normal" Buffer-Tool, use variable distance buffer-Tool: Add a Vector Field Input and change the input of the tool to Model Input. Then choose your field. So your model looks something like this (simplified):


1

You need to explore the helpfile and read up on what is referred to as a python toolbox. This will allow you to build the tool interface that will allow your users to select multiple layers and assign buffer distances to each layer. You need to define what is called a ValueTable.


1

I'm sure someone else can come up with a more elegant solution using PostGIS or python, but here's something I cobbled up using regular tools that should work if you're only concerned with a few river polygons. I hope I understood the size you want your resulting polygon relative to the original: v.voronoi.skeleton to find centerlines clean up the "...


1

I need to do something similar, but I don't seem to find the Euclidean distance tool. I have a polygon which represents a riverbed area and I would like to make a buffer based on the river width. So I am wondering if the proposed procedure is suited to achieve what I am trying to do. The buffer would be n*width with n an integer number I choose. If you look ...


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