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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

QGIS: unable to get geometry from WFS

I try to add bicycle lanes (TRASY_ROWEROWE) from a WFS layer from this server: https://wfs.um.warszawa.pl/serwis. After connecting and loading, the layer appears only as an attribute table, but with ...
user avatar
  • 1
0 votes
0 answers
11 views

Getting information from multilayer using lat lng without user click just providing lat long info

I have a leaflet map with multilayer and all layers coming from my GeoServer so there 3 layers 1 is a base map and the other 2 are overlayers. when I am clicking I am getting all information properly ...
user avatar
0 votes
0 answers
22 views

Update LineString with current position coordinates using Python

Actually I am tracking vessel, where I am already having path, and current position. Now the trouble is, obviously the vessel will not be on same coordinates as provided in the path.So I want to ...
user avatar
  • 1
1 vote
1 answer
19 views

Set point geometry of a list of points in PYQGIS

I want to create a temporary point layer from a list of points. The point list is: arr_error = [[547162.6286000004, 187063.95659999922]] vl = QgsVectorLayer('Point', 'Error_point', 'memory') pr = ...
user avatar
0 votes
1 answer
57 views

Clip lower value polygons with larger value polygons in shapefile

I have a dataset of circular polygons that correspond to tree crowns. Many polygons overlap with each other, and some are even completely covered by larger polygons (or larger polygons covered by many ...
user avatar
1 vote
0 answers
32 views

Issues splitting a polygon layer by line

So we have a problem, and we can't a find solution. if feat_L.geometry().intersects(feat_P.geometry()): success, splits, topo = feat_P.geometry().splitGeometry(feat_L.geometry().asPolyline(), True)...
user avatar
11 votes
4 answers
470 views

Deleting small holes in polygons with PostGIS

I have a big MultiPolygon layer in which I want to delete holes smaller than 100m². QGIS do it well and fast with the algorithm "native:deleteholes", but I need to use it as part of a SQL ...
user avatar
  • 506
0 votes
0 answers
23 views

Finding Maximal lines from multiple parallel lines

I have a lot of parallel lines in a list, and I am looking for a way to get the maximal lines that include individual lines. For example, let's say I have 10 lines. l1 = LineString(((0, 0), (8, 8))) ...
user avatar
  • 101
0 votes
0 answers
21 views

Geometry error with QGIS

I create rectangles from the tool "Rectangles, ovals, diamonds" on a layer (shapefile) of type point that I created before. Because I need to create rectangle with specifics dimensions then ...
user avatar
0 votes
0 answers
14 views

Getting an geometry error while creating a table in database from Python using SQLAlchemy

I am trying to create a table in PostgreSQL from Python using SQLAlchemy. The data is an GeoPandas data frame that has the below dtypes, when I am trying to create an table using the below code, it ...
user avatar
0 votes
0 answers
23 views

Making line thickness based on the sum of overlapping lines in QGIS [duplicate]

In QGIS 3.22.2 I have used the ORS distribution calculation tool to work out the number of vehicles that go from one origin to multiple destinations. I am trying to represent this number as a line ...
user avatar
  • 1
3 votes
1 answer
60 views

Finding change between two sets of polygon data in QGIS

Say that I have two sets of polygon data: one depicting world borders in 1990 one depicting world borders in 2020. I have ensured that both data sets are under the same projection. Both sets of data ...
user avatar
  • 131
3 votes
1 answer
71 views

"Has no attribute geometry" error when creating polygon with Shapely

In Shapely I am getting an error: "has no attribute geometry" when I try to create a Polygon from a list with QgsPoint: from shapely.geometry import Polygon points = [<QgsPoint: PointZ ...
user avatar
  • 79
0 votes
0 answers
25 views

Fix geometry to run pgr_createTopology which is very slow and fails

I'm trying to create topology in PostgreSQL using pgr_createTopology but it's very slow and fails after processing 4000 nodes. There are 300,000 nodes. I tried the same query with another road table (...
user avatar
2 votes
0 answers
35 views

How to make a projection of a linear layer on an another layer

I'd like to know how to make a projection of a complex linear layer on an another layer, overlapping their geometries perfectly and considering the extremities of lyr_1; using geoprocessing of QGIS. ...
user avatar
  • 649
1 vote
1 answer
41 views

OpenLayers GeometryCollection styling issue

With some help, I am able to draw some custom shape on my OpenLayers project with the following code. geometryFunction = function (coordinates, geometry) { const center = coordinates[0]; ...
user avatar
0 votes
3 answers
108 views

Remove the intersecting parts in a set of polygons [closed]

I have a set of (~200k) polygons showing deforestation in the Amazon. Each polygon is associated with a date when the deforestation happened. Some of them are intersecting with each other, ie. one ...
user avatar
  • 616
0 votes
1 answer
40 views

Forced to work with a Geometry with too many edges in GEE

I want to perform an unsupervised classification on a feature collection that has many small geometries. I know it will create problems for GEE to work on such many small geometries but I cannot find ...
user avatar
  • 451
1 vote
0 answers
20 views

How to assign point feature values to line features?

I have two datasets, one being a point feature dataset and the other being a line feature dataset. Each point feature contains a traffic count value that I want to assign to the corresponding line ...
user avatar
0 votes
0 answers
11 views

Point features do not emerge after applying st_intersection on two line features

The aim is to create a point at each intersection of roads via st_intersection. Before applying the function st_intersection, I dissolve the line features based on the road number (via ref). The ...
user avatar
3 votes
1 answer
73 views

Add angle of point from road as seen from left to right?

I have a layer of trees (purple points) that I want to add a column that equals the order of trees by angle if seen from left to right. For example, with the property with three trees, you would stand ...
user avatar
0 votes
0 answers
13 views

SQL Server WKT crosses antimeridian - sqlgeography looks normal, sqlgeometry does not

I have a WKT that crosses the antimeridian and is stored in SQL Server as a geometry. But when I read it back out it is stretched/skewed. If I take the WKT from the geometry, and create a geography ...
user avatar
3 votes
1 answer
84 views

Converting multipart polygon geometry with true curves to single parts loses true curves using ArcPy with ArcGIS Pro

I ran some test code below which creates four feature classes in a test geodatabase using ArcPy geometries in ArcGIS Pro 2.9.2: MultiPartPolyGeom has one multipart polygon with two parts (one a 3-...
user avatar
  • 63.7k
1 vote
0 answers
23 views

Removing glitches from edges of a polygon

Code: https://colab.research.google.com/drive/12gi6TDNLaYkz3qNkATryW_d-8QysH60L#scrollTo=xvNP-erJHlcP As you can see, there are glitches at each corner. And I would like to remove those glitches to ...
user avatar
1 vote
1 answer
41 views

Calculate MBR area, length and width with Python program in QGIS

I am trying to find MBR area, height, and width for polygon in QGIS. I have tried the below code. coordinate-system is geographic. As per my research for the correct value, I need some QgsPointXY but ...
user avatar
1 vote
0 answers
25 views

Creating a Point with SRID - MariaDB

I have a table containing a longitude and latitude (as doubles) in MariaDB. What I'm trying to do is create a point with a specific SRID - 4326. The current way that I create a point is by using the ...
user avatar
0 votes
1 answer
29 views

Geo search MySQL table for rows that are within proximity

I have an sql table that has some data on retail locations with lat, long coordinates. My application queries the table to pull the data using python. Here's some sample data: table1 id name lat ...
user avatar
  • 323
1 vote
1 answer
51 views

Attribute rule works in Pro 2.9.2, but not in Pro 2.6.8

I have a calculation attribute rule that works in Pro 2.9.2 (in a 2.9.2 FGDB). It updates the M-values of the polyline’s geometry: function pythagoras(x1, y1, x2, y2) { return sqrt(pow(x2 - x1, 2) ...
user avatar
  • 716
1 vote
1 answer
44 views

Creating a Polygon, with a hole, in Shapely

So I have two polygons: (i) An outer polygon, and (ii) an inner Polygon representing the 'hole'. I'm trying to merge these two to give a single Polygon, with the hole. For easy illustration, the outer ...
user avatar
0 votes
0 answers
63 views

Sample points from outside sf polygon object r

I am looking for a method, that allows me to select points that lie outside all features in an sf multipolygon object. In total I need 10,000 sample points. I am looking for suggestions that adhere to ...
user avatar
  • 395
0 votes
0 answers
32 views

Intersect points with polygons using SQL Server query from ArcGIS Enterprise Geodatabase

I have 2 databases in ArcGIS Enterprise Geodatabase in SQL Server. One database (DB_A) contains a feature class with points and the other database (DB_B) contains a feature class with polygons. I'd ...
user avatar
  • 271
3 votes
1 answer
59 views

Updating geometry field automatically from East and North fields in QGIS

I have a layer that contains a number of fields, two of which are "East" and "North". I would like to be able to set up the layer so I fill out the attribute form including ...
user avatar
4 votes
1 answer
104 views

Incorrect ST_Area after changing to 4326 in PostGIS

I'm trying to change the geometry in our database from 3857 to 4326 so that I can use more functionality within PostGIS. It converts them all properly when I run the alter column and transform query: ...
user avatar
1 vote
0 answers
31 views

Import a shapefile in a PostGIS table with a custom geometric column name

PostgreSQL 13.6, PostGIS 3.2, QGIS 3.22 I have a table with several geometric columns: CREATE TABLE IF NOT EXISTS activite.prescription ( gid integer NOT NULL DEFAULT nextval('activite....
user avatar
  • 1,035
2 votes
1 answer
355 views

Getting "No function matches the given name and argument types" when converting points to Polygons / Voronoi Diagram

I have these points stored in my database. Now I am trying to use to create a Voronoi diagram with ST_VoronoiPolygons(). I have tried doing: SELECT (ST_DUMP(ST_VoronoiPolygons(ST_Collect(geog)))...
user avatar
1 vote
1 answer
31 views

OGR_G_ForceToPolygon() doesn't produce polygon - GDAL C API

Using the C APIs for GDAL 2.2.2 (within Swift app) I have a very simple OGRGeometryRefH that is a wkbLineString. I'm creating the wkbLineString and attempting to convert it to a wkbPolygon geometry by ...
user avatar
1 vote
0 answers
157 views

Failing to deserialize geometry point data in Spring Boot REST API

I am working on a location-based REST API and so far everything is working fine, except for one controller which gives this error. I am new to this. 2022-03-16 16:28:37.842 WARN 7720 --- [nio-8080-...
user avatar
0 votes
1 answer
83 views

Converting a WKT column to type Geom

I have the following table in my MariaDB database: This table contains a column called 'coordinates' (type: LONGTEXT) with a wkt representation of either a MultiPolygon or a Polygon. I am attempting ...
user avatar
2 votes
0 answers
105 views

Snap points to polygon/lines in python shapely?

I have a shapefile of point features And a shapefile of polygons features I would like to snap these points to the polygons, as they are often just outside the polygons and cannot be spatially ...
user avatar
2 votes
0 answers
64 views

GIS operations to create a union from a polyline plus a polygon [closed]

I've got access to JS geospatial library (turf.js), which has a full suite of GIS operations available. But, I'm stuck on the terms for what I'm trying to do. In laymans terms, I wish to extend the ...
user avatar
  • 195
2 votes
1 answer
56 views

Filling holes and gaps in shapefile using QGIS [duplicate]

I converted a RBG to a raster then created a vector based on the values I wanted. The file looks good but there are some 'gaps' between the polygons. I tried the delete holes function but it doesn't ...
user avatar
  • 365
2 votes
1 answer
108 views

Fill NaN geometries records with other geometric column

I have a GeoDataFrame with two geometry columns. I want to fill missing values of the one with the other. Both columns contain polygons or multipolygons. I have tried: geo_df['geom_2'].fillna(geo_df['...
user avatar
  • 531
0 votes
0 answers
39 views

Add geometry to vector layer GEE

I have vector layers of the Congo that show the region, department and districts as FeatureCollections. However, for further analysis I need to add geometry attribute to them. I already tried to just ...
user avatar
  • 43
0 votes
1 answer
58 views

GeoServer unable to read from foreign tables?

When I add a layer in GeoServer that is a foreign table in my database, I get an error of: Failed to load attribute list, internal error is: Schema 'table' does not exist . When I add that same ...
user avatar
1 vote
0 answers
52 views

Geometry of the feature getting deleted after UpdateCursor

I am making a script which calculates numerous indices for each building. Here I am trying to get the area a 100 buffer around the building and the area of buildings intersecting with the buffer. Now ...
user avatar
3 votes
1 answer
43 views

Self-crossing/intersecting polygon in QGIS that tools identifies them as valid

I am using QGIS 3.14 long term version. I need to identify these polygons that are self-crossing. Here are the tools I have tried SAGA's "Polygon self-intersect"; check validity from ...
user avatar
1 vote
1 answer
33 views

Determine if a polygon of one layer covers a polygon of second layer

I am looking for a command for an extra column ("Reference") to list Polygons of Layer1 as "1" if they cover Polygons of Layer2. If not they shall be listed as "0".
user avatar
  • 233
0 votes
0 answers
102 views

How to determine the order of shapely's intersection function between two LineStrings

I want to find all the Point intersections between two shapely LineStrings. It is possible that there are multiple intersections and hence the output can be a MultiPoint. How do I know that the output ...
user avatar
  • 311
1 vote
0 answers
64 views

Compute the distance from a point to polygon given the point and direction

I want to compute the distance from a point to a polygon given the point and direction. Currently I am using shapely and defining a "somewhat" infinite line string. This is not ideal as I ...
user avatar
  • 311
1 vote
1 answer
73 views

Calculate length of line without using length function (and without densifying curves)

I have a polyline FC that has true curves (ArcGIS Pro 2.9 FGDB). Arcade: In an effort to find lines that have true curves, I want to compare: The length of the line using the Arcade length() ...
user avatar
  • 716

1
2 3 4 5
33