Tag Info

New answers tagged

0

I am not sure if this could be done in QGIS but you could use st_split for this if it helps. Try to make a buffer around your points and then split it where they intersect. A same question is asked at How to split a line at point positions?


2

the Create Random Points tool does exactly what you want. It requires either an Advanced license, a 3D Analyst or Spatial Analyst extension.


2

Just been looking at this thread and followed the link to the other thread which showed Numpy being used. I've personally never used this approach before so I started reading the help file about it and I think this can all be done in 5 lines! The dataset I tested this on was a polyline layer representing the rivers of the Amazon. So my code is as: InFc = ...


3

I think you're getting the error because the fieldnames list still contains the field LABEL, but you said you're not adding it to the output_fc. for field in fields: fieldnames.append(field.name) Right here you're getting all the field names. If you do a print statement above this line: cursor = arcpy.da.InsertCursor(output_fc, fieldnames) I ...


1

I had a tool I made that basically did this, so I just tweaked it a little to fit what you need. It's called Calculate Point Statistics, and you can download it here: http://ianbroad.com/downloads/CalculatePointStatistics.tbx Source code: http://ianbroad.com/downloads/scripts/CalculatePointStatistics.py It takes an input Polygon and Point feature class ...


1

The closest thing we have in Python to a standard built-in Polygon is defined in "A Python Protocol for Geospatial Data": https://gist.github.com/sgillies/2217756. The most straightforward way to get a Python polygon is to do this: # you have a list of points listPoint = [[13.415449261665342, 52.502674590782519],[13.416039347648621, ...


2

Seeing as you have Info (Advanced) level of license you can use the cool geoprocessing toys. Get the values of the polygons onto the points either by spatial join, identity or intersect. I think that intersect would be my choice. This will generate a point for each intersection i.e. if a point falls in more than one buffer then there will be one instance ...


3

The following explains (1.) how to construct technically a polygon from points and (2.) different methods to construct a polygon from points. 1. Tool to create a polygon from point coordinates I would use the GDAL Python bindings to do that. To give you a starting point have a look at the following script: from osgeo import ogr # you have a list of ...


4

ArcGIS has a tool to do just that called Bearing Distance To Line (Data Management). The syntax is as follows (from ESRI help): # Import system modules import arcpy from arcpy import env # Local variables input_table = r"c:\workspace\LOBtraffic.dbf" output_fc = r"c:\workspace\SOPA.gdb\lob_traf001" #BearingDistanceToLine ...


2

Join points and ploygons by location and continue your analysis with the join result. The join will append point attributes to the polygons inside which the points are located. Polygons which do not contain any points will have NULL values.


1

Other than "first one encountered" I am not sure what criteria one would use to select a point to retain. It seems quite arbitrary and a point may share multiple neighbors with your distance criteria but would not be retained if not in the correct selection order. This could add serious bias to your mean. It seems that you should calculate your neighbor ...


2

The "extract" function in the raster package will extract raster values to points for a stack or single raster.


0

Reading the comments under the question you're looking to extract values from a number of rasters at given points (that match your measurements). Working in QGIS (v2.2, but likely the same with other versions) you need: Your vector point layer as a shp file open Any number of rasters open (there's probably an upper limit to the number of files you can ...


1

It looks like your urban areas is a Boolean raster. If so, I would vectorize the raster as the simplest means of getting the urban area 'buffer' to match the 'jaggy sprawl'. You can then do a spatial join of the urban points data on your new polygons to provide the polygons with attributes. If the raster is not Boolean and is in fact a grey scale, then ...


1

Not sure what your image pixel resolution is, but you could use the Raster>Coversion>Polygonize tool to convert raster to polygon. The polygon table should have a column representing the color contrast from low to high which you could query to get ride of those features that are black. You could then apply additional analysis on this layer (e.g. dissolve, ...


2

Alan I would recommend that you insert the start and end coordinates as separate rows in your table. In that way you can create points for these individually like explanined below. I'm assuming that you have already: - created your new table - made this new table mappable - read the coordinates from the polyline into varialbes called fX1, fY1, fX2, fY2 ...


1

You don't need the ST_ClosestPoint function. ST_ClosestPoint only gives you the same point that ST_Distance calculates and uses internally. So what you are doing is running the same algorithm twice. If I don't miss something or just think wrong about it you are also doing things twice when you are both grouping and using distinct in this way. Distinct ...


2

With the advice of Mapperz I've edited my query: SELECT DISTINCT ON (lnumber) lnumber, strahler, min(ST_Distance(ST_ClosestPoint(strahler_streams.geom, landslide.geom), landslide.geom)) AS distance FROM landslide, strahler_streams WHERE ST_DWithin(strahler_streams.geom, landslide.geom, 2000.0) GROUP BY lnumber, strahler ...



Top 50 recent answers are included