Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 99589

(1) abstract geometry; (2) storing geographic data in projected coordinates; (3) a generic ESRI term for vector features; a class for "geometry" objects.

1 vote
1 answer
2k views

Difference between notations of WKT format: 'POINT()' and 'Point ()'

After reviewing this thread Adding field with geometry in WKT format in QGIS I started to wonder about the difference between the WKT notations: 'POINT(276547.16725324 5477265.87268898)' and 'Point (276547.16725324 … 5477265.87268898)' of the same vector geometry object. …
Taras's user avatar
  • 34k
4 votes

Passing Geometry object to processing tool instead of Layer

So, it seems there is no possibility to pass directly the geometry object to processing algorithm. … SELECT ST_GeomFromText('{difference_geometry.asWkt()}')", "result", "virtual" ) QgsProject.instance().addMapLayer(result) References: Creating Virtual Layer programmatically in QGIS Visualising WKT geometry
Taras's user avatar
  • 34k
4 votes

Merging layers with different geometry (PointZ and MultiLineStringZ) in QGIS

No, because "QGIS does not support GeometryCollection as a valid geometry type." You can not merge layers with "Merge vector layers", but you can package them with "Package layers". … References: QGIS does not show the Geometry Collection Polygons from JSON file Opening GeoJSON file with mixed geometries in QGIS? …
Taras's user avatar
  • 34k
2 votes
Accepted

SQL Query error: ambiguous column name geometry

In my opinion you do not need any SRID because you are not working with ST_Length_Spheroid(). What @she_weeds is pointing on is indeed correct. SELECT ws."Network", count(ws."Network"), sum(st_leng …
Taras's user avatar
  • 34k
3 votes
Accepted

Display point with heighest value in group of points

Perhaps, you will find this expression suitable for you: geometry_n( collect( expression:=$geometry, group_by:=substr("NumeroNom", 0, 5), filter:="AmslFt"=maximum("AmslFt", …
Taras's user avatar
  • 34k
4 votes
Accepted

Converting QgsPoint() to QgsGeometry() and vice versa with PyQGIS

TLTR; from qgis.core import QgsPoint, QgsGeometry # QgsPoint -> QgsGeometry point_as_geom = QgsGeometry(QgsPoint(10, 20, 5, 1)) # QgsGeometry -> QgsPoint geom_as_point = point_as_geom.constGet() Af …
Taras's user avatar
  • 34k
5 votes

Searching for values in different layers without nested for loops using PyQGIS

Referring to a single feature The getFeature() method of the QgsVectorLayer class works as following: QgsFeature QgsVectorLayer::getFeature(QgsFeatureId fid) const Queries the layer for the feature …
Taras's user avatar
  • 34k
18 votes

Visualising WKT geometry string in QGIS

ST_GeomFromText('{wkt_string}')", "result", "virtual") if layer.isValid(): QgsProject.instance().addMapLayer(layer) References: PostGIS | ST_GeomFromText Wikipedia | Well-known text representation of geometry
Taras's user avatar
  • 34k
8 votes
Accepted

Merging lines (with and with no overlaps) in QGIS

In Expression dialogue execute the following expression CASE WHEN sum(num_geometries($geometry), group_by:= geom_to_wkt($geometry)) > 1 THEN 'Y' ELSE 'N' END 'Y' will give you all … If there is a difference in any part of the geometry, this expression fails to match them. …
Taras's user avatar
  • 34k
1 vote

Creating heat map based on attribute from another layer in QGIS

Duplicate your layer via RMC > Duplicate Layer. When applying a change to the original layer also the duplicated one will be updated
Taras's user avatar
  • 34k
1 vote

Changing orientation of all polygons at once with numeric value in QGIS

SELECT "id", rotate(geometry, 45) AS geom FROM "polygon" The output point layer with its attribute table will look like It rotates geometry clockwise about the center of the original geometry’s bounding …
Taras's user avatar
  • 34k
1 vote

Save line geometry as points geometry using PyQGIS

@sweet.sugar.cola answered to her own question From one of the answers, I found a solution. The code below do exactly what I wanted. lakes=[] lineFeatures = [feat for feat in lines.getFeatures()] po …
Taras's user avatar
  • 34k
0 votes

Deleting duplicate geometry in PostGIS tables

@MAP answered to his own question: I finally found an easy way, which is working in my case: DELETE FROM planet_osm_point WHERE ctid NOT IN ( SELECT max(ctid) FROM planet_osm …
Taras's user avatar
  • 34k
1 vote

Mass editing of polygon vertices in shapefile in QGIS

There are probably better solutions (that will be provided), nevertheless, I am giving IMHO the most intuitive approach Step 1. Extract coordinates from polygon vertices, follow any of the suggested s …
Taras's user avatar
  • 34k
5 votes

What is "Fix geometries" tool actually doing in QGIS?

From the QGIS Documetation: Attempts to create a valid representation of a given invalid geometry without losing any of the input vertices. … Always outputs multi-geometry layer. More details you can find in: qgsalgorithmfixgeometries.h qgsalgorithmfixgeometries.cpp References: GitHub/QGIS/src/analysis/processing/ …
Taras's user avatar
  • 34k

15 30 50 per page