Questions tagged [geometry]

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

265 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
860 views

Right-hand-rule in QGIS

It seems that there isn't a plugin to perform the right-hand-rule on a layer or selected features. Can this be done by using some Python code? Is there a function that works in the same way as ...
4
votes
0answers
261 views

QGIS geometry error:Hole lies outside shell

I am using QGIS 3.8 and I am using a layer from OSM of Tokyo city. The layer is consisted from many polygons and I have tried to merge it but I got error. This is how the original layer was look like:...
4
votes
0answers
332 views

Change from LineString to MultiLineString when saving layer edits in QGIS

In QGIS, when a user creates a new single part line in an open editing session for a “Multi-Line” SpatiaLite dataset, the QGIS data type is initially a “LineString”. But, when the user commits the ...
4
votes
1answer
112 views

Style rule based on feature adjacency?

Is there a way in QGIS to use an expression to define a polygon feature's color based on whether it's adjacent to other features? I would like to achieve something like the following: -If a feature ...
4
votes
1answer
778 views

How to offset/displace overlapping lines in a web map?

I have a dataset of points representing a To/From status - something like distribution centres and delivery addresses. When the user clicks on a point I'd like to show the relationships between this ...
3
votes
0answers
43 views

QGIS Convert Shapefile to MSSQL as geography type

I am using QGIS 3.16 and SQL Server 2019. I have a shapefile loaded into the project. I have been able to successfully convert the Shapefile to a spatial dataset in SQL Server. My method for doing ...
3
votes
1answer
227 views

Invalid geometry in point layer when running 'Count points in polygon'

I have a persistent problem I can't seem to fix. I'm trying to run Count points in polygon. I keep getting this error: Feature (747) has invalid geometry. Please fix the geometry or change the ...
3
votes
0answers
36 views

Snap points to nearest line - however limit snapping to polygon the point sits within

I am trying to snap a series of points relative to the nearest line (which i know can be achieved via "Snap geometries to layer", however, i want to restrict snapping to the polygons the points sit ...
3
votes
0answers
62 views

Lines length plugin - QgsVectorLayer error

Several similar questions have already been made, but none of the is helping me. I have a layer of polygons and I want to known the length of each line of each polygon. And based on the length I ...
3
votes
0answers
191 views

Create multipoint layer from array by expression

I have two layers. One shapefile point layer, called "point1" and one csv no geometry layer, called "Meta". "point1" looks like: id bd 1 a 2 b 3 c 4 d 5 e 6 f and so on... "...
3
votes
0answers
336 views

Calculate length of selected features in PyQGIS

I create a selection with getFeatures(QgsFeatureRequest()) and I want to calculate the length of the result which is a QgsFeatureIterator : select = QgsExpression(" myexpression ") selectedfeats = ...
3
votes
0answers
174 views

Check Geometry - Bad Envelope

I have a polygon feature which returns Bad envelope when run through the Check Geometry tool. According to the help: Bad envelope : The envelope does not match the coordinate extent of the ...
3
votes
0answers
601 views

How to plot geometry(MultiPolygon, 3044) QGIS based datatype in python

I have a table tb_regions in Postgresql having a column c_geometry which contains geometry(MultiPolygon, 3044) datatype from QGIS. I know how to retrieve data from Postgresql using pythons psycopg2 ...
3
votes
0answers
410 views

Dissolve fails, geometry errors, and cleaning problems

I fairly new to GIS, and I'm having an issue with dissolving a vector. To start, I'm running QGIS 2.14.15 on Windows 7 Pro. When I try to dissolve the polygons it creates a blank shapefile. All of the ...
3
votes
0answers
201 views

How to measure orthogonal distance of line from point in QGIS?

As I am fairly new to QGIS I'm seeking your help. I'm trying to measure the distance between points in a point Layer P and the end of lines in a line layer L. In L there are two categories (attributes)...
3
votes
0answers
389 views

Interpolating point to nearest polygons to compute street width in postgis

I am trying to calculate the width of streets (line.shp) in postgis using reference point (ref_point.shp) (yellow point features) and building polygons (building.shp). The red point features are the ...
3
votes
0answers
456 views

Geometry issues when digitising in QGIS

I'm digitising a large number of maps from hand drawn mud maps and digital images, and although I have used the snapping tools ("snap to vertex and segment", Tolerance 10 pixels, avoid intersections) ...
3
votes
0answers
1k views

how to orthogonalize building outlines

I'm looking for a way to orthogonalize building outlines which I've extracted from a high-res DEM. I'm using the FOSS GIS stack (QGIS, GRASS, SAGA, PostgrSQL, PostGIS) and can code in Python (or Java)....
3
votes
0answers
399 views

What is the area that OGR extracts from the (geometry) shp files for polygons?

The ESRI July 1998 technical documentation for polygon shapefiles at page 10 makes no mention of either area measures or length measures (apart from byte/record-layout matters). Yet OGR enables me to ...
3
votes
0answers
98 views

PostGIS does not export shortest path to Shapefile

I am trying to draw a bunch of lines overlaying the globe map in a WGS84 projection. To this effect I have created a PostGIS DB with a table that has one column containing linestring data. My problem ...
2
votes
0answers
30 views

Geometry Type error preventing saving of layer after editing - geometry type is correct under layer information

I have a problem with a linestring layer that doesn't want to be saved after editing. The layer itself shows 'LineString' under the information tab. When I add a line with the tool by snapping the ...
2
votes
0answers
32 views

Are latitudes -90 and +90 both valid in WGS84?

Geometrically, I understand that a sphere can be addressed in latitude and longitude on the ranges [-90, +90] and (-inf, +inf) respectively. However, I am working on the specification for plus codes, ...
2
votes
0answers
21 views

Check geometries distorting polygons when removing gaps

Using QGIS 3.10.9 with the check geometries plugin (v0.1), and I have a simple polygon layer as a test run with a deliberate gap. I use the check geometries plugin with the topology check 'check for ...
2
votes
0answers
26 views

Transfer data with 'geometry' to Elasticsearch

I would like to transfer my data which contains 'geometry' to Elasticsearch but I don't know how to change my 'body'. 'geometry' is the last column. What should I change? Code: es = Elasticsearch() ...
2
votes
1answer
59 views

Rotating vertices of geometries in QGIS

I have a great number of area geometries, and line- and point-geometries which have a geometric relation to the area. That means that the distance and the orientation of the lines/points to the areas ...
2
votes
0answers
66 views

Invalid geometry type after clipping

I have two files (.xyz) with point data from a terrain. I'd like to create contour lines of said terrain but in a smaller area (limited by a polygon). After importing the points in two layers, I merge ...
2
votes
0answers
38 views

Feature is visible in a layer but geometry is None in QGIS using Python

I am using the feature's geometry in a layer to get the centroid point of the polygon. One particular feature is visible in a TOC layer and also able to select a feature. But, while reading that ...
2
votes
0answers
65 views

Creating line geometry from latitude/longitude dictionary

I want to create LineString geometry between points, based on a latitude/longitude dictionary. My code worked in QGIS 2.x but in QGIS 3.x, my new shapefile is empty. I have replaced QgsPoint and ...
2
votes
0answers
26 views

Problem with the correct calculate of the bisector of the angle

I have a problem with the correct calculate of the bisector of the angle. I use WGS84 projection. I have a bisector's bearing (azimuth), coordinates of start point and line length as input. Some ...
2
votes
0answers
79 views

Get length of a line stored in SQL Server Geometry column with srid 4326

I have some spatial data stored in SQL database geometry column called sp_geography (The field is defined as Geometry). The SQL below: f.sp_geography.STLength() returns, for example 0....
2
votes
1answer
228 views

Error while exporting geometry to CSV with MMQGIS

I am importing a DIVA-GIS shapefile into QGIS. It has a lot of polygons on it. My aim is to group different groups of polygons together and dissolve their internal boundaries so that I end up with ...
2
votes
0answers
238 views

QGIS: Update geometry via geom_from_wkt('POINT(X,Y)') - how to correctly parse string columns?

The columns containing X and Y strings look like -1234,56 So far i tried: geom_from_wkt(concat('POINT(',replace("wbr_komplett.X",',','.'),',', replace("wbr_komplett.Y" ,',','.'),' )')) and also: ...
2
votes
0answers
37 views

GDAL osgeo for python treating Z dimension differently

I have a space defined by a polyhedral surface, and I would like to check if a point is inside this space, and I would like to do this in python with gdal. After trying the default installation of ...
2
votes
0answers
70 views

QGIS: check and repair geometry

I'm studying how to check and repair geometry correctly and found the "check geometry" tool which seems to work fine. However there are also tools called "check validity" and "fix geometry" which ...
2
votes
1answer
147 views

Optimising Large Spatial Queries in SQL

I'm sure similar answers have been given elsewhere but no matter what I have tried I am unable to optimise this query. Details: TableA has 3.5mill records TableB Had 57000 records but I have ...
2
votes
0answers
95 views

Applying filter on the geometry for a given feature?

I have multiple layers, with multiple features, where I am interested in extracting information from a given feature within a rectangle. I am able to achieve this using the following filter, ...
2
votes
1answer
544 views

Problems with dissolving layers [QGiS 3.4.1]

I am currently working on a set of data that defines restricted areas for use of photovoltaic modules. This set of data amounts to 270.00 polygons in total [with their own geometry]. For simpler ...
2
votes
0answers
213 views

Calculate the length of geometry line object using python in QGIS

Calculating the length of a geometry line object using the Field Calculator gives you 2 options: $length where the length calculated by this function respects both the current project's ellipsoid ...
2
votes
0answers
94 views

Generate arc from projection coordinates

I have a mind to generate arc from given parameters: start point coordinates arcDistance arcBearing arcOrigin coordinates. My concept is, calculate the end point of arc (function geo.sphere....
2
votes
0answers
56 views

Can I correct position data from a device suffering from the 4/6/19 roll-over problem?

I work for a company that sells apparatus containing GPS receivers. Over the years a lot of this gear has been sold and deployed. A number of machines in the field contain GPS receivers that feature ...
2
votes
0answers
145 views

PostGIS ST_Area causing error when used with “use_spheroid=false” setting, succeeds with spheroid

I am running into an issue with using the PostGIS ST_Area function against a dataset loaded with osm2pgsql. Setup: PostgreSQL 11.2/PostGIS 2.5.1 osm2pgsql 0.96 When I attempt to run the ST_Area ...
2
votes
0answers
260 views

T-SQL Invalid Geometry Created by Intersection

I have two sets of geometries (A and B) in SQL Server 2016. I want to determine the overlap areas of those geometries from set A that intersect set B. Most of the time this code works: SELECT a....
2
votes
0answers
150 views

ST_ApproximateMedialAxis producing strange outputs

My problem is as follows: I have some lines (yellow), that I want to merge in one line if they are at a certain distance (blue, buffer), and after a long research I found this function from PostGIS/...
2
votes
1answer
922 views

Remove vertex from geometry (polygon) in OpenLayers 5?

I could able to remove the recent modified vertex of a feature using removePoint method of modify interaction, as well as using deleteCondition event of modify interaction. However, that is not what I ...
2
votes
0answers
357 views

Error WFS (2.0.0) GetFeature spatial query with multi-surface geometries in ArcGIS Server 10.6

In the new version of ArcGIS Server 10.6 it is not possible to request GetFeature WFS with spatial filters with multi-surface geometry. The following is an example of the query: GML3 geometry would ...
2
votes
0answers
299 views

Building footprint polygon simplification / generalisation

I'm looking for implementations of polygon simplification algorithms that preserve topology and overall rectilinearity. The input data is building footprints which often have squarish protrusions and ...
2
votes
0answers
103 views

Automatically delete overlapping polygons

I have 200 000 polygons that needs to remain like circle and they can't be on top of each other. I need to find a way to correct the 8000 errors I've got automatically. A picture's worth a thousand ...
2
votes
0answers
239 views

Shape index, compactness and assymetry index with PostgreSQL /PostGIS

I am working on automated land parcel identification and would like to extract road/river/thin and linear-like polygons from a massive dataset. For now, the only index I can get some answers from is ...
2
votes
0answers
2k views

How to connect existing postgis tables with Django models

I have some existing tables (shapefiles) and I want to connect each table with a django model. I imported the tables with shp2pgsql tool: shp2pgsql -I -s 2100 -W 'iso-8859-7' world.shp public.world | ...
2
votes
0answers
163 views

Faster equivalent of arcpy distanceTo method

Unfortunately arcpy distanceTo method is painfully slow. When speed is crucial, I am still using Avenue to work around it, but it is getting harder to transfer ArcView 3 to newer computers. As ...

1
2 3 4 5 6