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 [postgis]

PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.

10
votes
1answer
2k views

QGIS save postgis table error : no result buffer

I've a polygon layer on PostGIS, and when I try to add featureS using QGIS it gets error when I save the edit. Here is the error notification "no result buffer". I found a similar case here : ...
0
votes
1answer
30 views

How to make points with fixed distance and orientation from another points layer?

I have a points layer with hundreds of features at variable distance from each other. Now what I want to do is create 4 new points for each feature of this layer at a fixed distance (30m) AND ...
2
votes
2answers
2k views

Move features to different geographic area

I want to move a dataset of a few thousand vectors to a different geographic area. However I can't seem to find any tools to do this, or I'm not sure on the terminology for what to look up. I suppose ...
3
votes
1answer
65 views

QGIS Geometry Generator Line Type

I am trying to create a line style for a multiline geometry. I am hoping to create a linetype which looks like the following The Points are not an issue, its the line/lines entering and exiting at ...
1
vote
0answers
24 views

Create continuous line network using PostgreSQL [on hold]

I have shapefile which doesn’t have continuous network. I want to connect it to the nearest node and create continuous line from it. Is there any step by step material which I can followed? or any ...
28
votes
8answers
7k views

How to create regular point grid inside a polygon in Postgis?

How to create, inside a polygon, a regular grid of point spaced x,y in postgis? Like the example:
1
vote
0answers
30 views

Use less temporary space in DWithin join

I only have 12GB of free space. Is there a way to create this table without creating a bunch of temporary files? It runs out of space and never completes. I want to know how many cities are within ...
0
votes
1answer
20 views

Deselecting previous selection in OpenLayers?

Previously we did when you click on a geometry on the map to color in another color and zoom on geometry. But now you should deselect the previous selection in the original color in which the map was ...
0
votes
0answers
29 views

Reading and processing large shapefile

I have a large shapefile (~10 Gb) which it output of Atoll (RF Coverage) and I need to perform some post-processing on it. I began by importing the file in a file geodatabase, the file was imported ...
1
vote
0answers
40 views

Finding overlapping geometries in the same table using PostGIS [on hold]

I have a table containing about 50,000 polygons and some of them are overlapping. I'm trying to use PostGIS to return a table with all the overlapping parts of the polygons along with some of the ...
1
vote
2answers
50 views

Load LINESTRING in WKT-format from CSV to pgAdmin?

I've got a CSV file with a column containing LINESTRINGs that looks something like this: 1,"LINESTRING(20.331 54.33, 21.67 44.89, 12.67 13.5679)",2014-03-09 13:30:33,2014-03-09 13:31:33 2,"LINESTRING(...
0
votes
1answer
25 views

PostGIS cannot create extention:ERROR: cache lookup failed for function 1

When trying to create PostGIS extension I am getting this error: ERROR: cache lookup failed for function 1 I am running PostgreSQL 11 on Ubuntu 16.04. I have installed PostGIS and PostGIS scripts. ...
2
votes
1answer
844 views

Drawing line with lon, lat, distance and azimuth?

I have table in PostGIS with lon, lat, distance and azimuth columns. I want to make Geoserver draw a line through first point with given length and direction. I can turn lon and lat to geometry in ...
2
votes
3answers
1k views

Create hex grids over a layer

I have a shapefile that has the outlines of the United States and I want to create hex grids that over that layer. I tried using this function that will create hexes over a layer. I created an empty ...
57
votes
5answers
19k views

Creating regular polygon grid in PostGIS?

How to create, on the shape of a polygon, a regular grid of polygons/squares of an given size, in postgis? I have thought about a function like How to create regular point grid inside a polygon in ...
1
vote
1answer
45 views

Turning a single MultiPolygon into many small polygons?

I have a large GeoJSON file with a single very complex MultiPolygon, and I would like to turn it into an identical file with many small polygons. How can I do this? I can use ogr2ogr or mapshaper or ...
1
vote
1answer
154 views

ST_Intersects returning incorrect result on routing problem?

I have a table that contains the shortest path between destinations for survey respondents on an osm2po created network. When calculating the shortest path result, I store the geometry in a column. ...
1
vote
0answers
31 views

QGIS temporary layer to PostGIS table database

I have an empty polygon table in PostgreSQL/PostGIS database with fields (id,field_1). after some processing in QGIS using pyqgis and processing toolbar I create some temporary layer like this case : ...
-1
votes
0answers
8 views

Overlapping points converted into separate distance in ArcMap [on hold]

How can I convert overlapping points data into separate distance in ArcMap or PostGIS? Something like Disperse Markers in ArcMap but this is representation only. I need a shapefile.
0
votes
0answers
27 views

Cache lookup failed for function 1 while activating PostGIS

I'm using PostgreSQL 10.5 on a remote server (Debian). I created a database inside then I attempted to enable PostGIS but it wasn't successful. I had this error : cache lookup failed for function 1
9
votes
1answer
5k views

Creating line from points using PostGIS?

I have a PostGIS table with position data of numerous vehicles and want to create lines from these points. Data can be selected by vehicle id and ordered by timestamp but how to create lines from ...
2
votes
1answer
21 views

Managing custom projections

I am developing a mining sampling database. There will be many project specific, user created projections. Typically they will be Oblique Mercator defining a local coordinate projection system. ...
6
votes
4answers
330 views

Identifying “long and narrow” polygons in with PostGIS

I have a set of polygons representing large areas, say city neighborhoods. I want to identify the large overlapping areas between them. But there's a problem: sometimes these polygons will overlap ...
0
votes
1answer
28 views

Boundary point snapping post process - QGIS/PostGIS [on hold]

I have a set of polygons that have been digitised without snapping I want to achieve this after the event such that shared boundaries share common points. I have QGIS and PostGIS At present the ...
0
votes
1answer
53 views

Using ST_Intersect in PostGIS? [closed]

I am a beginner with PostGIS. I would like to know if it’s possible to use Count or “>” with ST_Intersect. Which districts sit in 3 neighbourhoods ? SELECT district.name FROM district JOIN ...
-3
votes
1answer
59 views

Using PostgreSQL as database with ArcGIS Pro? [closed]

I've been with my current job for 2 years now and have been using QGIS with PostgreSQL. We are currently testing ArcGIS Pro noticed that I can connect to my PostgreSQL database that I was using on ...
1
vote
1answer
687 views

Calculate total line lengths within a polygon?

I have basically the same conundrum as Calculating line segment lengths within polygon using ArcGIS Desktop? but I'm working in PostGIS, not ArcGIS. Any pointers? This query seems to like it should ...
1
vote
2answers
57 views

ST_Union Topology exception despite of valid geometries

I have an isochrones layer and I want to calculate the population lays on the overlapping regions. My first step is to create an intersection between all the isochrones. After that, I try to create a ...
1
vote
2answers
43 views

Smooth Edges of polygon in postGIS

I have a shape that looks like this: It's the end result of a buffer, merge, bugffer and Chaikin Smoothing process in PostGIS. It's almost perfect however I'd like to remove some of the "fissures". ...
2
votes
1answer
56 views

Using ST_UNION to combine several polygons to one MULTIPOLYGON using PostGIS?

I have a problem with ST_UNION So, I have a several polygons DB looks like this I need UNION all off those polygons to one multipolygon and get result that looks like this I tried use ST_UNION ...
0
votes
1answer
107 views

Where can I find correct shapefile for Montenegro municipalities?

I downloaded a shapefile for Montenegro from https://gadm.org/download_country_v3.html and created a table in PostGIS using shp2pgsql. The table has column geom of type geometry which is a ...
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: ...
5
votes
1answer
91 views

Create a line string from street geometry

I'm currently facing some hard times trying to create a simplified line from a street geometry. The data that I'm currently using comes from OpenStreetMap, using osm2pgsql.(Which means PostGIS, but I'...
1
vote
1answer
40 views

Find all circles that overlap with point

(I'm very new to (Post)GIS in general, and I couldn't find an existing answer to this (or just don't know the right terminology) -- sorry if it's already been asked & answered) I have a bunch of ...
1
vote
1answer
27 views

Problem with checking for Valid Geometries for PostGIS in Azure

I have used this PostGIS in different environments many times without issue: update my_table set geom = ST_MakeValid(geom) where ST_IsValid(geom) = false; However in Azure I keep seeing the ...
9
votes
4answers
1k views

Connecting points (bus stops), which don't lie on lines (LINESTRING), to network?

I need to connect bus stops (points) to a network layer (OSM data). These bus stops do not lie directly on the lines (see screenshot) nor should their location be moved. I use PostGIS, pgrouting and ...
0
votes
0answers
32 views

Precision difference MSSQL geometry vs PostGIS geometry [closed]

For a school project I need to sync geometries betwee a MSSQL server and a PostGIS with a Python script (get geometry as WKT, create shapely polygons and compare with .equals). Everything works fine ...
5
votes
2answers
902 views

Moving PostGIS database for Social Media to Cassandra? [closed]

I currently have a large and growing database of geo-social media. I'm using Postgres with postgis, and so far it's been quite good. My use case thus far has been to query the database for all posts ...
1
vote
3answers
84 views

Is there anything faster than PostGIS ST_Intersects for seeing where features intersect (or something wrong with my approach)?

Basically have 2 tables. 1 is buildings (1809555 rows called oregon). Another is flood zone (164 rows called oregonslr1). Want to see where they intersect to get number of buildings flooded. I am ...
4
votes
2answers
714 views

Finding points within elliptical area using PostGIS?

Using PostGIS 2.0.0 I need to filter the results of a function, which returns many POINTs, to find the ones that lie within an elliptical area (like a great circle line with a buffer around it) ...
0
votes
1answer
75 views

OS Translator II TOID (fid)

I've successfully loaded in OS MasterMap to a PostGIS (2.4.4.1) database, and it appears in QGIS (2.8.9) fine. Somewhere during the load process the FID from the raw files (the TOID) gets replaced ...
1
vote
1answer
29 views

OS Translator plugin replaces the unique feature references (TOIDs) with ogc-fid which is an integer

I've successfully loaded OS MasterMap Topography GZs files into my PostgreSQL (9.5) database, using OS Translator II plugin within QGIS (2.18.18). But somewhere during the translation process the ...
2
votes
0answers
49 views

QGIS and remote PostgreSQL/PostGIS slow performance

I'm using a cloud service for hosting my PostgreSQL/PostGIS database. When connecting with QGIS, its extremely slow. The observed behavior is: Connecting to PostGIS DB: works great. Adding a layer ...
0
votes
1answer
25 views

How to read WKB from a PostGIS table with the sf package in R [closed]

I'm working with OpenStreetMap data, for the manipulation of which I mostly use raw SQL queries to a PostgreSQL/PostGIS database. However this is not the most productive workflow, and I would like to ...
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 ...
2
votes
1answer
72 views

Better performance for geohash aggregation with PostGIS

I'm using the GeoNames (https://www.geonames.org/) dataset and want to aggregate the points in geohash of a specific precision. Beforehand I'm filtering with an bbox. So this is the query I came up ...
1
vote
0answers
27 views

Create a Non-North/Rotated-Vertically User Coordinate System?

I need to plot 3d PostGIS data into vertical planes for symbolization and drawing vertical cross-section interpretations for mineral exploration models. I have written a short plpgsql function that ...
0
votes
1answer
32 views

ST_Within doesn't use BBOX (&&)

I have an PostgreSQL Query to search Points within a polygon: With x as ( SELECT ST_GeomFromGeoJSON('{"type":"Polygon","coordinates":[[[10.2224394042641,53.3854964923405],[9.96469942811056,...
0
votes
1answer
22 views

How to cast Geometry to Geography in PostGIS/Postgres with sqlalchemy + geoalchemy

Some PostGIS functions behave differently based on the arguments types. Example: ST_Distance will calculate projected units distances for geometry arguments and meters distances for geography ...
0
votes
0answers
46 views

Using ST_Intersection with three or more tables

I'm trying to achieve a multiple-table intersect with PostGIS while retaining the geom for each shape. For any given property shape, I want individual cuts of that shape split apart by different ...