Questions tagged [postgis]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

FME discard destructive operations in the table handling drop-down list for PostgreSQL / PostGIS writers

In FME 2023, one can use a PostGIS writer to write some spatial data to a PostGIS database and that's great. In the table section, one can select one of several Feature Operations: When using upsert ...
0 votes
1 answer
22 views

Possible QGIS issue suggesting that PostGIS ST_Colormap inserting NULLDATA values in output during converstion of greyscale to colour raster

I am trying to convert an BNUI 255 greyscale image, with values 10-80 into a colour version using the PostGIS extension(3.4) to Postgres(16.2) using the following code CREATE TABLE colour_ras AS ...
2 votes
1 answer
2k views

Can't connect with my PostgreSQL database with ArcGIS

I have created a database in PostgreSQL, spatially enabled it, and now I need to connect it with ArcGIS (we use only ArcGIS products here on my university), everything on localhost, I've tried ...
3 votes
1 answer
2k views

PostGIS: ST_Union fails with valid polygons?

I am working with this dataset. I have imported it into a Postgres 9.6 database with shp2pgsql as follows: shp2pgsql -I -s 5070:5070 us_govt/PADUS1_4Fee.shp usgovt | psql -d mydb I have made all the ...
0 votes
1 answer
31 views

FME restart identity sequence when using Truncate Existing in the writer table handling drop-down menu

In FME 2023+, when using Truncate Existing in the Table Handling drop-down list in a PostgreSQL/PostGIS writer, is it possible to reset the numbering sequence associated to the primary key when this ...
2 votes
0 answers
12k views

Setting up PostGIS: Postgres can't see the PostGIS extensions? [closed]

I've just installed Postgres 9.3.4 and PostGIS 2.1 on OSX Mavericks using the very latest versions of the KyngChaos libraries. This is a new machine, and I deliberately haven't installed Postgres ...
2 votes
0 answers
44 views
+100

Finding interpolated value from raster data in PostGIS

I have a series of values that were computed for each cell on a grid on a given territory. Those values has been stored in a raster field in PostGIS (there are no missing data). I want to run a query ...
1 vote
2 answers
629 views

How do I solve "django.db.utils.OperationalError: near "CASCADE": syntax error" in GeoNode install?

I have followed the Advanced Installation instructions for GeoNode Project, but at the Run GeoNode Project for the first time in DEBUG Mode step, it says to execute: # Prepare the GeoNode Spatialite ...
1 vote
0 answers
12 views

Confusing mixed geometry error in ST_Clip with raster and MultiPolygon

I'm getting an error about an operation on mixed geometries coming from a use of ST_Clip(raster, geometry). All the tables involved are uniformly SRID 4326 but maybe it's coming from an empty raster (...
1 vote
1 answer
318 views

Install PostgreSQL and PostGIS

QGIS 3.10.2 in Ubuntu 18.04. I'm having problems installing PostgreSQL and PostGIS following the instructions here: Installing PostGIS under Ubuntu. This doesn't work, 'postgresql-9.1-postgis' isn't ...
1 vote
2 answers
67 views

Filling field with values from field of another table using QGIS

I am using QGIS 3.28.9. I need to complete a field from a building's layer with the field's values from a plot's layer, based on the location of the buildings. At first I thought of doing it through ...
1 vote
1 answer
333 views

FME: SQLExecutor [PostGIS Format] ST_Intersects() Not Recognized

Scenario: [A] 5,784 polygon geometries + [B] 2,100,000 address points Source Format: [A] GDB Feature Class, [B] PostGIS Table Goal: Find which address points [B] intersect with polygon geometries [A] ...
1 vote
0 answers
102 views

Managing PostGIS many-to-many relationships between several tables with different geometry types from QGIS

I have this data set stored in a PostGIS (16+3.4) database: Each category of items being stored in its own table: CREATE TABLE public.rock ( id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, ...
0 votes
0 answers
13 views

Mergin db sync fails to start

I actually experiencing two type of issues. I am using DB-SYNC 2.1.1 on Windows. I have couple of tables in a database and I am actively using row level security, to modify the availability of data to ...
0 votes
0 answers
27 views

Unable to obtain connection: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused)

I have a PostgreSQL server with PostGIS extension enabled running on docker with port 5432 exposed. I'm able to connect using psql -h localhost -p 5432 -U postgres -d db but when I try to use the same ...
0 votes
0 answers
24 views

PostGIS install issues

I'm running Debian 12 and PostgreSQL 16 and trying to install PostGIS. At this point when I run apt-get install postgis I receive: Reading package lists... Done Building dependency tree... Done ...
1 vote
1 answer
95 views

Finding rectangular polygons in a multipolygon

I'm trying to do some analysis that requires finding rectangular gardens of a certain size. At present, I only have access to a data set of property extents with buildings punched out with the ...
5 votes
1 answer
2k views

Seeking Data visualization and maintenance tool [closed]

Background Looking to leverage an existing GIS system for exploring organizational data. Architecture The following figure represents a high-level overview of the system's desired features: The most ...
1 vote
1 answer
460 views

Cannot invoke "org.geotools.data.DataStore.getTypeNames()" because Datastore is null

I would like to import shapefiles to PostGIS. the method I used to work with takes as argument the path of the shapefile ( a string ) , but since I need to link this to my frontend , I can only work ...
7 votes
1 answer
599 views

ST_Difference in PostGIS : problem with geometry result (Polygon)

I'm experimenting a result issue using the ST_Difference spatial function in PostGIS. Input : Feature 1 and 2 overlaps each other. Both contains 5 vertices, like a rectangle (4 plus an additional one ...
6 votes
1 answer
437 views

PostGIS ST_Length returns 0 for geographies with high number of decimals

I'm having a weird issue when computing the distance between two geographies using ST_Length (PostgreSQL 10.4, PostGIS 2.4.4). Basically if the number of decimals is above six, ST_Length returns 0 in ...
6 votes
1 answer
237 views

ST_3DIntersects says 'no' despite geometries intersecting

Considering the following query I expect both geomb and geomc to 3D Intersect with geoma. According to postgis, only geomc intersects. Unfortunately I can't come up with a more simplified polygon as ...
4 votes
1 answer
100 views

ogr2ogr: Unable to import shapefile with '-lco RFC7946=YES' parameter to the PostGIS db

I'm trying to convert multipolygon to in the right-hand format so that Leaflet can use it on the front end. ogr2ogr -nln [target_table] -nlt PROMOTE_TO_MULTI -lco GEOMETRY_NAME=geom -lco FID=gid -lco ...
-1 votes
1 answer
43 views

FME Postgres Serial - Red Attribute

I have a small table of wells with just a name, lat, lon, and geometry in an Esri Shapefile. I am putting them into a PostGIS database and it works well, so I added an arbitrary well_id as a serial ...
1 vote
1 answer
401 views

Reconstructing PostGIS geometry from ST_DumpPoints()?

The PostGIS ST_DumpPoints function seems to have enough data in the return value about the structure of geometries (in the path field): It returns a set of geometry_dump rows, each containing a ...
3 votes
1 answer
324 views

Scripted generating then loading rasters to PostGIS - raster2pgsql phantom

(Ubuntu server 18) It seems that raster2pgsql is included in the postgis package but I can't find it separately to download either source or binary. Supposedly there's an executable somewhere in the ...
2 votes
1 answer
86 views

Create a raw SQL statement ready to be used in PostGIS from a geometry in QGIS

Given an existing geometry in QGIS 3.28+ (e.g. from a temporary scratch layer), is there a quick way (i.e. with the lowest amount of user actions) to generate the PostGIS geometry definition (raw SQL ...
3 votes
1 answer
60 views

How to speed up ST_Union PostGIS query for complex problem

I'm fairly new to working with PostGIS and have experienced the issue of extremely long runtimes when working on my data. Here's what I'm trying to do: I have an infrastructure dataset that is made up ...
0 votes
1 answer
177 views

Calculate direction in PostGIS & Django (GeoDjango)

Is it possible to calculate direction to detect if users are moving in "similar" direction having a few of their last coordinates (Points) using PostGIS + Django (https://docs.djangoproject....
0 votes
1 answer
2k views

PostgreSQL Query which returns geom column as WKT set in function

Given: We are accessing a PostgreSQL DB from a VB NET application. When the query completes the DB rows are delivered in a VB NET DataTable. The Postgre DB geom column is in the format of System.Bytes[...
1 vote
0 answers
32 views

GeoServer feature type loading issue

I have a table on a PostGIS database with these fields: id [serial integer] pname [text] links [text] area [integer] docs [json] For this layer, I have created a WFS layer on GeoServer. However, the ...
1 vote
1 answer
50 views

Why do I need to use quotation marks ("") to call a table in PostGIS? I remember not to need it in other exercises

When I try to run the following code I get an error that disappear when I call the tables using quotation marks. I remember having run tables before without it. select cine as INE from "...
0 votes
2 answers
71 views

Missing line segment when serving a vector tile from PostGIS

I'm hosting a table of four points in PostGIS and querying it to create a vector tile layer of a line connecting the points. The second and fourth points in the table are the same. The resulting ...
6 votes
3 answers
1k views

Create contour line from point table in PostGIS

I have a point table containing values ranging from 0 to 100 and I would like to draw a contour line for the value 70. (See image below) I know how to create contour lines in QGIS for raster data but ...
1 vote
1 answer
44 views

Cannot cancel pg_routing query in local database

I have tried to cancel the hung query after a pg_routing query, but cannot. I have encountered this problem previously with pg_routing, but ended up really messing up the local database and had to ...
2 votes
0 answers
46 views

Why is find_srid no longer immutable?

I recently upgraded our PostgreSQL engine from 11 to 13 for one of our dbs and along with that, I upgraded PostGIS from 2.4 to 3.4. We're using MapServer for one of our apps and it's generating ...
3 votes
0 answers
50 views

PostGIS: Why does <-> and ST_Distance give two different results?

I have a query where I want to get the closes row by coordinate distance like so: SELECT A.id, st_distance(coords, ST_SetSRID(ST_MakePoint(-9.15054,54.115341), 4326), true) AS dst, A.coords &...
8 votes
2 answers
2k views

Collapse dual carriageway lines in PostGIS

I have OpenStreetMap data, which represents larger roads (e.g. dual carriageways, aka divided highways) as parallel lines. The question is answered for ArcGIS or Skeletron here, for example using ...
1 vote
1 answer
64 views

Importing vector layers where geometry is WKT in PostGIS

I am trying to import the layers in QGIS to PostGIS. However, I want the geometry imported to be WKT and not WKB. How can I do that?
0 votes
1 answer
274 views

Connect to Supabase PostgreSQL database with ArcGIS Pro

I am trying to connect my PostgreSQL database on supabase.com with ArcGIS Pro and edit data. Only way how I was able to do it was when I've created a new database on the pgAdmin inside supabase ...
1 vote
0 answers
31 views

How to write GeoSPARQL query when hexadecimal representation of a binary encoded geometry

I am trying to write a GeoSPARQL using the geometry column of a layer imported from QGIS to PostGIS. The format of the geometry column is hexadecimal representation of a binary. When I try to use geo:...
0 votes
1 answer
423 views

Connecting PostGIS with GeoNetwork

I would like to connect a PostGIS-PostgreSQL database created in pgAdmin to GeoNetwork. Which files in the webInf under the geonetwork folder I am supposed to modify and how?
1 vote
0 answers
45 views

How to find the relation between track and track points after importing GPX data with ogr2ogr?

I've imported the gpx file into postgres db with postgis enabled using ogr2ogr: ogr2ogr -f "PostgreSQL" PG:"host=xxx user=xxx password=xxx dbname=xxx" "test.gpx" As ...
3 votes
1 answer
195 views

How do I append a shapefile to PostGIS table with multiple geometry fields using ogr2ogr?

I am having an issue when trying to append shapefile data to an existing table in my PostGIS database using ogr2ogr. The existing table has multiple geometry fields. When I append the shapefile the ...
0 votes
1 answer
402 views

QField Cloud-PostgreSQL, Cloud not syncing back to PostgreSQL

I am trying to set up a project with QField Cloud where when you get back to the office and hit sync on the phone/tablet it goes to our PostGIS database. I have gone through the workflow in the ...
2 votes
1 answer
48 views

pgr_createTopology not working is dynamic sql code

I have the following dynamic sql query (left out many lines of code before this, but it works up to the pgr_createTopology element for creating the topology of an extracted stream network based on the ...
1 vote
1 answer
270 views

Using a PostGIS Layer in QField

I am trying to use a PostGIS layer in QField and somehow, i can not manage it to work. My goal is to collect pointdata via QField using a PostGIS-layer so all collected data are available in the ...
3 votes
1 answer
137 views

Calculate maximum inscribed rectangle in a polygon

I saw this amazing answer here, but am struggling to run the function. When I feed it a geometry it returns NULL values for each row of the input dataset. Any ideas what might be causing this? I'm new ...
0 votes
0 answers
34 views

GPS points closest to checkpoints on the road [duplicate]

I'm a beginner with the following situation: There are fixed checkpoints on a road. The GPS of a vehicle traveling on the road registers timestamped points with a certain frequency, with a low level ...
1 vote
1 answer
40 views

Upgrading PostGIS 3.0 to PostGIS 3.3 on RHEL 8 fails

I am not a DBA. I am trying to update our PostGIS 3.0 package installation on a PostgreSQL 12 database to PostGIS 3.3 package on a RHEL 8 server. I am unable to install both packages at the same time ...

1
2 3 4 5
188