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.

1
vote
1answer
41 views

PostGIS: Running multiple intersections within a single SQL query?

PostgreSQL 11 + PostGIS, on Windows 10. I'm working with a PostGIS-enabled database. I want to UPDATE a large polygon table (100,000+ rows) WHERE the geometry of that host table intersects the ...
0
votes
1answer
13 views

Google Earth hide geometry except for a small area

In a Google Earth tour, I only want to show a specific small area, that is, I want to hide (not render) all terrain outside of this area. If such hiding is impossible, can I use a black "image overlay"...
1
vote
1answer
25 views

Area Value not getting reflected in attribute Table using PyQGIS?

I have a WardBoundary.shp file in my project. I need to find the area of each polygon ( representing different wards).With the help of this comment on Adding Area column in Polygon layer using PyQGIS?,...
1
vote
1answer
45 views

Type geometry does not exist PostGIS [duplicate]

I am trying to add a geometry column to an existing table in PostgreSQL inside a plpgsql function using EXECUTE format('ALTER table %I add column geom geometry(Point, 102003)', target_table); Its ...
-1
votes
1answer
46 views

Adding Area column in Polygon layer using PyQGIS? [closed]

I have a WardBoundary.shp file with Polygon Features in it. I have to calculate the area of each Polygon and write into attribute Table. I can do manually by using '$area` but I need to automate ...
0
votes
1answer
104 views

How to create a function for finding the largest of 2 polygons by area in PostGIS?

I tried my level in creating the function but it shows error while running. I have enclosed the code here : create function largest_poly (geom1, geom2) returns geometry as $largest_poly$ begin from ...
3
votes
1answer
34 views

Exporting render of polygon after applying smooth geometry command using QGIS?

I have recently discovered the smooth($geometry,x) command in QGIS which is very convenient for me. However, when exporting polygons, the "smoothness" obviously goes away as the vertices are untouched ...
0
votes
1answer
41 views

Using geometries to extract line segments in ArcPy with ArcGIS Pro?

I'm trying to use geometries to cut down a feature class of polylines to just the first 400m of each polyline. I modified an answer from Split a shapefile of lines into even spaced segments and am ...
0
votes
0answers
10 views

MySQL update geometry field

I have MySQL database with table in X varchar(50) latin1_swedish_ci No None Change Change Drop Drop More More 11 Y varchar(50) latin1_swedish_ci No None ...
1
vote
1answer
34 views

Storing date in m-dimension of PostGIS geometries

Do you know if it is possible to assign a date (whatever the format) as the 4th dimension to a geometry in PostGIS? If so, does it recognize it as a date?
2
votes
1answer
31 views

Client-Side Polygon split

I wanted to know if there is a way to split a polygon using JavaScript. So I have a web map which uses Leaflet API, and the user needs to cut polygons which are shown in the map using a straight line. ...
0
votes
1answer
32 views

ST_SnapToGrid doesn't work properly, e.g. 41.94186153740355 -> 41.941861499999995

I'm using ST_SnapToGrid: ST_SnapToGrid(somePoint, 0.0000001) and I get strange result on many points, such as: - POINT (21.619820510769063 41.94186153740355) -> POINT (21.6198205 41....
1
vote
1answer
35 views

Harmonize geometry of different shapefiles (QGIS) [closed]

I have got to harmonize the geometry of a big amount of shapefiles in QGIS The files are actually very big. So it would be a lot of work to do it manually. Do you have any suggestions for me?
2
votes
1answer
76 views

Converting MULTIPOLYGON field stored as text to geometry data type in PostGIS and plotting in QGIS

I have this column Multipolygon which has data stored in this format which is in TEXT: MULTIPOLYGON(-115.528984981578 51.2006109579736, -115.526434407604 51.1974145241941, -115.546464451 51....
2
votes
2answers
135 views

What is the unit of the area when geometry attributes are calculated in QGIS?

My CRS is WGS 84. I intersected two files containing polygons. Each file has an attribute table stating the area of each of the polygons (in m2). After intersecting them I navigate to: Vector >> ...
0
votes
1answer
36 views

Transform geometry of polygons

I am new to PostGIS. I'm making a spatial join, but it does not work. From what I saw it is something of the geometry of polygons. My polygons are saved with the "Geom" field like this (Geom geometry (...
0
votes
1answer
13 views

Counting (Multi)Polygons Within (Multi)Polygons on same Table

So I have a table with approximately 10k rows, with each row having its corresponding geometry entry. What I am attempting to do is count how many row geometries are contained/within the geometry of a ...
0
votes
0answers
23 views

Compare Specific Points of Line Features in two Feature Classes using FeatureClassToNumPyArray

I am looking to compare the first and last point between features in two different feature classes. The features share a common ID. My thought was to create two arrays via FeatureClassToNumPyArray. ...
1
vote
1answer
25 views

Defining geometry type in QgsDataSourceUri

There is a PostgreSQL database containing some layers that have few types of geometry (multipolygons and linestrings). I need to distinguish these geometries in two separate layers. My basic strings ...
2
votes
4answers
132 views

Adding points along the centre lines with QGIS

I'm trying to solve a spatial problem in QGIS. I have a set of polygons which I would like to add points along the centre line of each polygon. These points should be placed at 3 metres between each ...
0
votes
1answer
20 views

Plotting Geographical Grid from Long/Lat Coordinates in R

I have a file of coordinates (Long/Lat) that should enable me to plot a series of 10km grid squares covering the UK. However, for each grid square I have five sets of coordinates by way of plotting ...
1
vote
0answers
33 views

Identifying geometry format?

I have a database with geometries encoded in a field in the following format: '1 L 410012.85,416177.69; +30.16,4; 12.46,0; 13.35,-0.67' Where L specifies that it is a Polyline, then 410012.85,...
0
votes
0answers
33 views

Definition for point and line geometries?

There is a common definition named "area geometry" to categorize polygons and circles and any geometry that has a surface area. I would like to know if there is an alike definition for points and ...
1
vote
1answer
44 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
55 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
32 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
29 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 ...
2
votes
1answer
111 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
60 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
29 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
325 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
29 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
89 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
37 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
35 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 WinForms application and the following code: IMxDocument document = (...
2
votes
0answers
45 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
56 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
41 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
43 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
180 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
24 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
19 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
39 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
70 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
44 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
46 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
136 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
58 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
114 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
92 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 ...