New answers tagged

2

A bit of a workaround , but you could do the following: Generate your random points inside polygons tool normally. A unique ID is generated Run a distance matrix, using the unique ID generated as the required unique ID for the too, and specifying the output matrix type as Standard N X T distance matrix Intersect the resulting distance matrix with the ...


4

You can use the QGIS DB Manager to create an SQL query using Virtual layers. The following SQL code corresponds to the test layer I created. You need to change the names to match those of your data. select a.rand_point_id, a.id, b.rand_point_id, b.id, distance(a.geometry, b.geometry) dist from r_points as a, r_points as b where a.id = b.id and a....


1

If I understood your question right, the azimuth you're looking for is the azimuth of the small red lines in the original answer. I created this line using the following expression on the layer with the resulting points (those inside the polygons). It includes the overlay_nearest function, available since QGIS 3.16. The first argument is the reference to a ...


0

If your point data can be visualised in a GIS system such as arcmap then there are tools that will string the points together into a polyline which you can then export to a kml. You'll want to work in wgs84. I'm sure there will be equivalent tools in qgis if you prefer to use that?


1

I was having the same problem and managed to figure it out using the general_log.csv and observed how MySQL Importer QGIS Plugin wasn't having the same issue. The following query is needed for you to get QGIS working with your table: CREATE TABLE `target_schema`.`geometry_columns` ( `F_TABLE_CATALOG` varchar(256) DEFAULT NULL, `F_TABLE_SCHEMA` varchar(...


4

You have got four columns in the output point grid because you have got the four corner points of each polygon grid. To see it visually, create a point grid layer, as you have already done, and specify the x and y spacings: you will get the following grid of points: Now, create a polygon grid with the same xy spacing, and the same extent of the point grid ...


0

EUREKA for feature in shape: #geom = feature.GetGeometryRef() geom = feature.geometry() json_geom = feature.ExportToJson() geom = json.loads(json_geom) poly=(geom['geometry'] ['coordinates']) poly_a=(poly[0]) print(point_inside_polygon(x,y,poly_a)) print ("------")


0

Why not use the contains methods on the polygon (geom)? p1 = Point(-90.2, 14.3) for feature in shape: geom = feature.geometry() if geom.contains(p1): print(geom)


1

Some more details about this feature in QGIS, along with PyQGIS code to accomplish the same setting. Global setting As @ndawson explained, this setting can be set for any feature created using QGIS. PyQGIS The same can be set by the following PyQGIS call: QSettings().setValue('/qgis/digitizing/disable_enter_attribute_values_dialog', True) Per layer setting ...


0

this might be of help - try using the calculator and referencing the field and updating the X & Y to specific locations geom_from_wkt('POINT('||'31.797788'||' '||'30.729471'||')') further info at - QGIS update feature geometry from attribute fields


0

If you're interested in a solution that involves the R-ArcGIS bridge and a single tool to do all of this in one step, check out this solution I came up with. You should be able to copy the code in an R script, import as a custom tool, and then you just have to specify a few input parameters like point layer, polygon layer, coordinate system, etc. This ...


4

You can do that using the following steps: Use Sample raster values to extract the raster values to the point locations Add a new field of numeric type (float, for example) name it Subtract or the name you like to store the subtracted values. Finally, use field calculator to subtract the values retrieved in step 1 from z values of point data. Note: Make ...


0

If you just want a solution for your ideal result, get one geo latitude and longitude per hour per user then there is no need to remove duplicates or work with point clusters: I assume that you have the data as a csv-file: import pandas as pd from datetime import datetime test_df = pd.read_csv("test_df.csv") # 1. convert datetime string in ...


2

In the most recent version of QGIS, they added a feature called "Add X/Y Field to Layer" which (In this case you're wanting the lats/longs of a point layer) will add the latitude & longitude to your specified projection as x (longitude) & y (latitude) columns


1

You don't need to sort anything. Issue is due to the features have a wrong id. So, you only have to assign them in the correct order. It can be done in QGIS with a little PyQGIS script where I pair ids and point geometries in a list of lists. These lists are used to change ids to correct order and directly to produce a good looking line. It looks as follows: ...


1

If you are looking for a simple line that is going in only one direction, a straightforward way to solve your problem is to use the derivated geometry attributes in order to join the points in the correct order. Using the Points to path algorithm, add the geometry attribute in Order by expression. For example, $X will join the points form the left to the ...


0

maybe this is not best solution but i think it can work. Your problem is that you have not correct order. To get order, you have to calculate all distances between the points. Then you have to calculate shortest distance between two points and save them to a list(for each point). After that you have to create new field in attribute table and set up the order....


Top 50 recent answers are included