New answers tagged

0

Probably not the best method but something similar happened to me a while ago and the way I resolved it was to: Resave your point layer with the Save As... option, as mentioned by @SpatialSuccess Toggle the Edit button for your point layer, select all points either manually or using the Field Calculator Click the Move Feature(s), select and drag one point ...


2

When you switched the CRS did you do a 'save as' (required to reproject)? If you just changed the CRS in the layer properties you won't actually reproject and will see features moving. If this is the case, you'll need to first set the CRS back to the original in layer properties, then do the 'save as' to reproject to your desired CRS.


2

My suggestion is based on a method I apply to group smaller subcatchments into larger. There are no streams, thus 1st step to compute Euclidean minimum spanning tree: I guess it is some sort of optimisation already. Pick your sink and create directed graph. Picture below shows "Flow Accumulation" in links, i.e. count of nodes discharging into it: ...


0

I recreated your query to see where it goes wrong. The last error you came across is because of the faulty reference of px instead of geom (partly my mistake because I gave the hint of aliasing with geom) but there would likely have been more errors after that. Here's the query I created out of it, as you can see the sensordata has been replaced with just ...


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 ...


2

You have to change 2 things in your query: add an alias 'geom' right after 1, 1, NULL))


0

For US-level analysis I usually use the USGS Albers Equal Area projection "USA_Contiguous_Albers_Equal_Area_Conic_USGS_version". proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs EPSG: SR-ORG:7480


0

If you have a table of the 1700 points to remove, you can display these points as XY coordinates. Select all of the original shape file points then use Select by location to remove from the selection the points that match the 1700. This selection can then be exported as a new shape file.


1

Try to "Select by expression" under Geometry you will find $xand $y to build the expression you need. You can then use "Save As" and check only selectet features to save the selection to a new file/shape. edit: I missed the arcmap label, still this should be possible there too.


0

I think there are some cases where you might justifiably store a point in both geography and geometry type but don't do it until you have to. I would recommend keeping things simple and choosing one or the other unless you run into actual performance issues that only this approach could solve. The drawbacks are It's icky, like storing serialised data in ...


1

To dump only unique points, you could use a few subqueries with a SELECT DISTINCT ON expression: SELECT geom, gid, path FROM ( SELECT DISTINCT ON (geom) geom, path, gid FROM ( SELECT (ST_DumpPoints(the_geom)).geom, (ST_DumpPoints(the_geom)).path, gid FROM my_linestrings_table ) f ORDER BY geom, path, gid ) f ORDER BY gid, path;


1

Try this version (modified from gene's response): vl = QgsVectorLayer("Point?crs=", "temporary_points2", "memory") vl.dataProvider().addAttributes([ QgsField("X_coord", QVariant.Int), QgsField("Y_coord", QVariant.Int), QgsField("Azimuth", QVariant.Int) ]) new_features = [] for row in range(0,rows): for col in range(0,cols): rspnt = ...


2

The problem probably could be here: . . . out_rst.SetGeoTransform(g_x_min, g_pixelWidth, 0, g_y_max, 0, -g_pixelHeight) . . . because 'SetGeoTransform' method needs a list as parameter. Try out this: . . . out_rst.SetGeoTransform( [ g_x_min, g_pixelWidth, 0, g_y_max, 0, -g_pixelHeight ] ) . . . I hope that it helps Editing Note: I tried to ...


2

If you want to perform a selection for each row, as your script indicates, you need to convert your point object to a geometry object. Here's a very messy line of code that will do so: arcpy.SelectLayerByLocation_management('ptLayer','intersect',arcpy.Geometry ("point", row[0].firstPoint, arcpy.Describe ('Build2035').spatialReference)) If you want to ...


3

You just need to turn on map tips.


2

Include fill/color in your aesthetics mapping: ggplot() + geom_polygon(data = tz.prj, aes(long, lat, group = group), fill = "#f1f4c7", color = "#afb38a") + geom_point(data = tz.c, aes(lon, lat, fill = "Hospitals"), pch = 21, color = ...


4

1) If your pnt shapefile has only one element, use the iterator method next(): feat = pnt.getFeatures().next() pntxy = feat.geometry().asPoint() If the shapefile has many elements, use list comprehensions pntxy = [feat.geometry().asPoint() for feat in pnt.getFeatures()] # select pntxy[0] or pntxy[1] or... 2) instead of GDAL, why don't you use directly ...


1

From ESRI Mapping Center: The default symbology can be changed using the Advanced ArcMap Settings Utility. This executable file is usually found in your C:\Program Files\ArcGIS\Utilities directory. Just navigate to that directory, double click the AdvancedArcMapSettings.exe file and the ArcMap Advanced Settings dialog will open. Click the ...


0

You could avoid the need for a recursive query by taking the following approach: From each input LineString, extract the endpoints into a two-point MultiPoint Run ST_ClusterWithin on the extracted endpoints Spatially join the endpoint clusters to the original geometries. Here's an example: CREATE TABLE test_lines (id serial, geom geometry); INSERT ...


2

I have found a suitable solution to the question I asked earlier. To do this I used the Convert Geometry Type function from MMQGIS plugin (the plugin must be installed). MMQGIS → Modify → Convert Geometry Type From the window I chose the layer(line type) and chose New Geometry Type (this has several options) I used Centroid and selected the Output Shapefile. ...


7

What you seek can be done easily using the digitizing tools plugin. The plugin adds a new toolbar with a couple of new tools. The tool you need for this task is the amend line. It get active when you turn edition mode in a line layer. And you use it by clicking the begin or end vertex of a line and then keep clicking for new vertex. To finish, you ...


1

The Node Tool can be a little difficult to handle, and can give random results when dealing with end points. You are following the correct procedure, but sometimes the new point seems to be created "under" the old one (it just happened to me). Just try again and maybe try to change the zoom level. It should work eventually.


2

Not sure if this is what you're looking for, but if you use the Marker line Symbol layer type, you can set marker placement and rotation: The rotation field can be set by expression or field, and is relative to the angle of the line. Please let me know if I've misinterpreted your question



Top 50 recent answers are included