Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
18 views

Algorithm addgeometryattributes not found

I am trying to find area and perimeters of Polygon using Pyqgis3. I tried manually first Vector->Geometry Tools->Add Geometry Attributes. By doing so, I get the area and perimeter column in the ...
0
votes
1answer
31 views

What algorithm is used by the $geowithin operator of Mongodb

MongoDB can perform geospatial query such as finding restaurants inside region with the operator $geowithin. For example: db.places.find( { loc: { $geoWithin: { $geometry: { ...
0
votes
1answer
20 views

Text File MultiPolygon/Polygon to PostgreSQL using Python/Psycopg2

I am writing a python script attempting to insert GeoJSON Polygon coordinates into a Postgres table. I am writing a basic insertion code since I am new to GIS domain. The code look like this: ...
1
vote
1answer
22 views

Why does this R code that maps points into polygons cause a segmentation fault?

As in this question/answer, I have a data frame of points (which also includes some necessary, non-coordinate data columns) and a shapefile. In this case the shapes are US states. The last line of the ...
1
vote
1answer
67 views

Listing all overlapping polygons using PostGIS?

Assume a table of overlapping polygons where the number of polygons overlapping a single area varies from 1 to n. I am trying to find a PostGIS/SQL query that will return a list of all of the polygons ...
0
votes
1answer
30 views

Preserving geometry with Virtual Layer in QGIS 2

There is a polygon layer "Union23" that was created with 'Union' tool. Layer's attribute table includes the following values. My effort is simply to aggregate those polygons by "FLAECHEID" field ...
1
vote
1answer
26 views

How to calculate a position based on nearby sensors with weights

I'm working on an indoor-positioning project where the users are carrying phones which can detect beacons located throughout the facility. The phone app only knows the IDs of the beacons, and can ...
2
votes
1answer
76 views

Creating square buffers around points using shapely? [duplicate]

I am trying to create square buffers around given points, I am able to create circular buffers but how do I create square ones? from shapely.ops import transform from shapely.geometry import Point ...
1
vote
0answers
28 views

How to remove complicated shapes in ArcGIS - generalization [duplicate]

What can be the way of simplifying polygons in ArcMap? I have a shapefile with buildings and I have to make them as simple as it's possible. I used already some tools, like: dissolve, union, ...
1
vote
1answer
76 views

How to find lat/long of point knowing cross track distance

Knowing lat/long of point A , B and C. And knowing cross track distance (CTX) from point B to point D. How to find lat/long of point D?
1
vote
2answers
30 views

Measuring width of polygons, which is wider than long

Within my project I am trying to quantify and compare different submarine landslides with ArcGIS. Therefore, I created a polygon shapefile and mapped the spatial extent of each landslide. Now I want ...
0
votes
1answer
23 views

Listing only Polygon Feature Classes in IMxDocument using ArcObjects?

I am using VS 2017 with ArcObjects trying to list all polygons in IMxDocument to be used as clip feature in my add-In. I have a WinForm and the following code: IMxDocument document = (IMxDocument)...
2
votes
0answers
30 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... "...
0
votes
1answer
23 views

Find index of Linestring element at feature, when hovering - openlayers/GeoJson

I have a Geo-JSON Linestring, this is drawn by 800 elements in OpenLayers 4.6.5. I'am trying to use the map.forEachFeatureAtPixel, and print a pop-up when hovering for individual elements on the ...
2
votes
0answers
27 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 = ...
2
votes
0answers
40 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 ...
1
vote
1answer
107 views

Handling AIS data using Python and PostGIS?

I want to turn points into a linestring in PostgreSQL with the extension of PostGIS using Python. I want the lines in a new table because every few minutes more points are added and it needs to keep ...
1
vote
0answers
23 views

Feature geometries sometimes treated as equal, sometimes not (PyQGIS)

QGIS 3.4x64 and Python 3.7 seem to sometimes treat my geometries as equal, sometimes not. I'm debugging code using a reduced dataset with 3 points. Points A and B have the same geometry, and point C ...
0
votes
0answers
18 views

Separate interstate and non-interstate roads from a given route

I have direction steps from city A to city B (obtained from Google Directions API). I need to differentiate the interstate road distances from non-interstate distances in the route. Google ...
2
votes
0answers
35 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 ...
1
vote
0answers
35 views

Extracting shapely polygons from .png file? [closed]

I have a .png file coming from a WMS service (WFS is not available). It only contains "straight" lines and I would like to extract the geometries (shapely polygons) of the connected components of ...
2
votes
1answer
39 views

Bearing Geometry Automatic Calculation?

I am building a cadastral fabric and it's really nice to have the bearing and distance come up on the lines as I traverse around. I just found a great way to do this with the Add Geometry ArcGIS tool. ...
1
vote
2answers
40 views

arcpy.da.InsertCursor generating empty polygons?

I am using this script to copy some features from an input featureclass into an output featureclass. This works for points but surprisingly not for polygons. For polygons it is generating features ...
2
votes
2answers
123 views

Azimuth calculation from One to Many Points in PostGIS

I have vector data of 3D City Model in PostgreSQL database. So from my data geometry column, which is a surface geometry. (These are geometries of all the surfaces of buildings). I had extracted the ...
2
votes
0answers
21 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....
0
votes
1answer
63 views

Is it possible to use SELECT ST_GeomFromText( with other SELECT? [closed]

I'm trying to use SELECT ST_GeomFromText() with a value catched from another query: SELECT ST_GeomFromText( ST_AsText( ST_GeomFromGeoJSON( SELECT column-name FROM table-name ORDER BY ...
1
vote
0answers
57 views

Problem importing geometry from CSV in QGIS

I have a polygon layer (although I have also converted it to points and tried it that way). I would like to copy this layer into excel and add it back in after editing some things. I've attempted to ...
0
votes
1answer
48 views

Invalid geometry constructed by EE Python API

I have a problem with Python API of Google Earth Engine. I'm trying to create a vector mask of a small area based on NDVI. I take Sentinel-2 data as two bands and pass a rectangle (defined as series ...
0
votes
1answer
41 views

Measuring distance to two Points in ArcPy?

I would like to know how to measure the distance from two Points in ArcPy? I know only Geometry has the distanceTo method but how do I could make a typecast in ArcPy? I got the following error ...
1
vote
1answer
31 views

Cluster geometries that touch each other

I'm trying to cluster the geometries in a sf object that touch each other. For the moment I'm using the same approach that it's explained in the answer here, but the problem is that the same idea ...
0
votes
1answer
56 views

Troubles with reprojection

I want to draw a polygon on the world map in different map projections, for example, in mercator proj or stereographic one. They must correspond to ICAO ares G (https://aviationweather.gov/satellite?...
2
votes
2answers
120 views

Creating point at defined distance along line in PostGIS?

How do I create a point at a defined distance along a line? I know we have ST_Segmentize, but it creates more than 1 points - I only need 1. What I want is: For each line: Create ONLY 1 point at ...
1
vote
0answers
45 views

Avoiding or reducing invalid geometries when geoprocessing in ArcGIS Desktop? [closed]

I use geoprocessing with large polygon datasets. I use Multipart_to_Singelpart and Repair_Geometry to remove all invalid geometries, prior using the tools like Union or Intersect. Regardless the ...
0
votes
1answer
42 views

How to populate a feature table in a GeoPackage file using GDAL?

I want to use the binary version of GDAL to avoid programming in C or Java here. So I have created a SQL file and I want to run it using the following command : ogrinfo.exe empty.gpkg -sql @...
2
votes
2answers
73 views

GeoJSON put in the OpenLayers maps

I am a beginner in OpenLayers. I would like a GeoJSON to be displayed on the map. Can you provide me with some example code to allow me to build this small project? The GeoJSON code is: {"type":"...
0
votes
1answer
193 views

How to fix 'GeoSeries' object has no attribute '_geom'

I'm working on a python script whose goal is to detect if a point is out of a row of points (gps statement from an agricultural machine). To do this, my idea is to make a buffer around the 10 points ...
0
votes
0answers
99 views

How to convert geometry in the GeoJSON from PHP and insert polygon in PostGIS

I'm a beginner in PostGIS and GeoJSON. I need to extract every geometry from GeoJSON and store them in the PostGIS database as polygons. For each entry in GeoJSON I would like to be able to store ...
1
vote
1answer
66 views

Getting halfway point in Polyline in ArcGIS API for JavaScript?

I would like to reach the mid point of a polyline. I just tried the centroid and realcentroid properties but I only got a soluction in ArcPy with the code below: Midpoint = geometry....
1
vote
0answers
62 views

What is geometry(4326), and can you do Cartesian calculations with unprojected ellipsoidal coordinates?

I know Geography(4326) is an unbounded, and unprojected, and covers the entire world with ellipsoidal coordinates. I get that the math on this system is done on a spheroid. I also get that with a ...
0
votes
1answer
71 views

Delete vertices on polygon feature class, based on the intersection with point shp with python

I need to delete some vertices from some polygon fc that are unnecessary for the geometry. I have a point shapefile that contains all unnecessary vertices as points - but how can I access the vertices ...
1
vote
1answer
153 views

Invalid geometry vs. no geometry

Looking at the QGIS API Documentation: bool QgsFeature::hasGeometry Returns true if the feature has an associated geometry. Is invalid geometry different from a feature having no associated ...
0
votes
1answer
60 views

Using centroid point to generate polygon using ArcPy? [closed]

Is this possible to generate polygons from points (which are centroids of future polygon)? I got shapefile with ~250 points + they have got two attributes: length and width. I don't need complete ...
3
votes
1answer
146 views

Merging lines (with and with no overlaps) in QGIS

I have two layers ("Layer_1" and "Layer_2") of lines where they sometimes overlap and follow each other for a bit and then takes another route (see the image below). "Layer_1": Red line "Layer_2": ...
2
votes
1answer
53 views

Method to convert all 'overlapping' points to exact same geometry in QGIS 3.4

I have a point vector layer with approximately 2.5 million points, many of which share the same or a very similar geometry (within 1 m of each other). I would like to know if I can bulk amend the ...
2
votes
1answer
57 views

PostGIS geometry to GEOS geometry without lwgeom dependency?

I've been looking for ways to convert PostGIS to GEOS geometries without linking to or dependency on lwgeom/liblwgeom. The closest thing I can find is a mention of the pointcloud approach here: ...
4
votes
1answer
102 views

Automatic polygon placement from trail

I have a shapefile with >300 points that correspond to the points where vegetation survey plots were carried out 10m from the road on both sides. Plots have the dimensions 20mx50m. The attributes ...
0
votes
0answers
22 views

Exporting feature's geometry coordinates to readable file

I'm new to ArcGIS and I'm am trying to export the coordinates on the bottom to a human-readable file, see example below. How can I accomplish this?
0
votes
1answer
58 views

How to get the Z values of existing lineStringZ with pyqgis?

I can get the values of 3D QgsPoints with mypoint.get().z() When I iterate through a layer to get a specific polyline and then iterate through the polyline to get the start and end points- start_point ...
0
votes
2answers
152 views

Multipoint to point tool in Qgis

I have a multipoint adress layer creating problems with set-returning function cannot be used. I tried : Converting multipoint layer to point using PostGIS? Multipoint vs point PostGIS I tried ...
1
vote
1answer
43 views

Projecting shapefile of point geometries?

I am trying to creating a point shapefile that lies within polygon(a feature layer). By creating point geometry objects and filtering the ones that fall within the polygon(feature layer), I created a ...