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
1answer
24 views

Does the projection of a PostGIS table affect the rendering speed in QGIS

I am interested to know whether changing the projection of a PostGIS table will affect the rending speed when viewing it in QGIS. I have two layers coming from QGIS which are exactly the same and ...
1
vote
0answers
14 views

st_3dshortestline equivalent in Python 3

I have two geopandas Dataframes with 3D geometry. I could transform it in any other data type it could be more easy to use. I would like to know if there is something similar to the st_3dshortestline ...
0
votes
0answers
22 views

PostGIS with GeoJSON: `geometry` v. `geography`

Does the GeoJSON spec imply or strongly suggest that PostGIS geometry type should be used over geography? Looking at section 3.1.1 I am seeing that In other words, every point on a line that ...
1
vote
0answers
25 views

Tenant isolation in SaaS product based on PostGIS - do the same concepts as PostgreSQL apply?

We're working on two different GIS apps and we're a bit torn around how to provide a level of tenant data isolation on our GIS systems. System A would need to have strong tenant data isolation where ...
4
votes
1answer
50 views

Performing Esri NAD27 to WGS84 datum transformations with ST_Transform in POSTGIS

I am trying to align with some data points that have been projected in Esri from NAD27 State Plane feet (SRID=32026) to Lon/Lat using the "NAD_1927_To_WGS_1984_6" datum transformation using ...
1
vote
1answer
36 views

Layer is being add to 2 groups instead of 1

I'm trying to create 3 group layers, depending on parameters of two lists, but reg_imobiliarios layer is added to auxiliar and referencia groups. In short, all the layers are in the correct group, ...
0
votes
1answer
47 views

ST_Intersect is giving wrong polygon back

I imported the french IRIS dataset by shp2pgsql. Added LAMB93 to the PostGIS spatial_ref_sys. shp2pgsql -W latin1 -I -s 97527:4326 CONTOURS-IRIS.shp iris20 | psql -d iris20 -v ON_ERROR_STOP=1 So ...
2
votes
1answer
76 views

How to increase a PostGIS query efficiency when querying OSM information

I have this SQL query to get roads from my PostGIS server. WITH boxed_roads AS (SELECT * FROM "planet_osm_line" WHERE ST_Within(way, ST_MakeEnvelope(xmax ,xmin, ymax, ymin, 4326)) ) SELECT ...
3
votes
3answers
86 views

Find islands using PostGIS

I'm trying to find islands (type not water, completely surrounded by water) in a polygon table. The polygons are not overlapping. Data: CREATE TABLE islands ( ID serial PRIMARY KEY, type ...
1
vote
1answer
37 views

Calculating list of existing polygons with distances from newly created QGIS/PostGIS

I have two polygon tables (SRID=4326) in postgres: t_areas and t_sites. Once I insert through QGIS 3,8 a new area in t_areas I'd like PostGIS (by a trigger) to list all sites within a certain km range ...
2
votes
1answer
80 views

Invalid Geometry - Which column can I change to geometry?

I have a csv file with thes two columns (amongst others): localisation and geo_point_2d. Here is the content of one cell of localisation : {"type": "MultiPolygon", "coordinates": [[[[-53....
5
votes
1answer
50 views

Calculate volume of MultiPolygon Z using Postgis

I am trying to calculate the volume of a multipolygon z using Postgis. SELECT ST_Volume(geom) from grb; And I get this error: MultiPolygon is invalid : Polygon 0 is invalid: points don't lie in ...
4
votes
1answer
68 views

What is being filtered?

I have a Postgres/postgis table of polygons. When added to QGIS the total feature Count is 64671 in layer tree and attribute table. But the attribute table also says Filtered: 43573. I have not ...
1
vote
1answer
43 views

Convert a SQL Server Geometry into PostGIS spatial data with Python and shapely

I'm trying to migrate spatial data from a SQL Server database to a PostGIS database with Python. I need this to be automated since its not just one table, but a lot tables in a lot of databases. I am ...
-1
votes
0answers
24 views

I got this error : elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison [closed]

rint(sf.columns) se=float(numb1.get()) cur.execute("select distinct nassereddine_carte_gouv.c_gouv from nassereddine_carte_gouv,disshp where nassereddine_carte_gouv.c_gouv=disshp.id and Shape_leng &...
6
votes
2answers
141 views

QGIS and PostGIS, dimensions problems

I have a point-layer i Postgis v12 which is ST_point, ST_NDims = 3. When creating a new point i QGIS and then tries to save it, I get an error: Column has Z dimension but geometry does not When ...
1
vote
0answers
21 views

Using Odoo as a database for QGIS

Is it possible to link an Odoo database (CRM) into GGIS? I have an online Odoo Studio account with lots of data including long/lat data etc. Is it possible to link the Odoo database directly with Qgis ...
2
votes
1answer
32 views

Find path containing point

In Postgres with PostGIS extension, I try to figure out to find the path containing a specific point: table A contains POINT table B contains PATH My code returns 0 rows when it should select * ...
0
votes
1answer
50 views

Verify PostGIS connection, username and password

I wrote the code below, but I need that the PostGIS connection to be verified, to be sure that the username and password are right. I tried this: How to access user credentials in database connection? ...
2
votes
1answer
40 views

PostGIS: Extract intersected areas with their related column values

I have inserted a MultiPolygon table in PostGIS with the following columns: id, e_id , p_id, com, geom Assume that I have 4 polygons with overlapped areas with the following values: id com geom 1 ...
4
votes
1answer
85 views

How to create Polygons of a specific size?

I'm trying to create polygons of specific size in square meters that represent the areas surrounded by roads. The roads are stored in PostGIS as points / lines. If required, I can convert the data to ...
0
votes
0answers
24 views

How to create a clean-graph/network layer to be used in Offline Map-Matching algorithm in QGIS

I want to use the Offline Map-Matching algorithm in QGIS to match GPS trajectories with a road network. This road network layers needs to be "a clean graph following a node-edge-model, i.e. different ...
0
votes
1answer
42 views

Load all SRTM data into PostGIS

I am trying to load all the SRTM data into a PostGIS database. I tried the process described here: https://postgis.net/docs/using_raster_dataman.html It created a giant SQL file. When I tried ...
0
votes
1answer
41 views

How to check “simplification sensibility” of a geometry?

It is expected that a "geometry simplification" is a good practice to preserve stable versions of a geometry, avoiding minor and non-relevant changes (side effect of geometry-editors and other "false ...
1
vote
1answer
47 views

Finding points closest to latitude longitude point using PostGIS

Right now I have a data base with PostGIS. Several of the data sets contain different locations at latitude longitude points. I will be doing several queries based at different latitude longitude ...
1
vote
2answers
44 views

PgRouting coverage area with node restrictions

I have a water network in which there exist valves at nodes between two edges (pipes). When the valve is open water can flow, if not, it can't. How can I calculate the catchment area from a start ...
0
votes
1answer
36 views

Importing Shapefile to PostGIS using QGIS DB Manager

I am trying to import a shapefile from my QGIS project to my PostGIS schema using DB manager. I want to create a new table in my public schema and I have an ERROR: relation "spatial_ref_sys" does ...
0
votes
1answer
55 views

QGIS 3.10.2 - 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 ...
0
votes
0answers
27 views

How to work in the form of QGIS PostgreSQL fields which is of type array[]

I have a table in a PostgreSQL / PostGIS database where there are columns of type array [] and I would like to know how to work on the QGIS form. Example: I have a column called "WALLS" and that ...
3
votes
0answers
48 views

Function to make a trajectory more straight

I'm new at PostGIS and I have to do a project for my university course. I'm trying to analyze a trajectory of points that I downloaded from my runtastic app but it's a mess. There are some points ...
2
votes
1answer
35 views

ST_Intersects with multiple geometries

I am just learning PostGIS and have a simple problem I can't get the answer for. I want to select the geometries that intersect with given multiple geometries. To make it simpler, let's say I want ...
1
vote
1answer
54 views

Creating precise shapes using list of coordinates?

I am using st_concavehull to create boundaries/shapes. This works, however, the shape is not precisely tracing the coordinates. It is more puffy, as if trying to even out or "clean up" the actual ...
0
votes
0answers
20 views

pgr_dijkstra ERROR: invalid memory alloc request size 1080000000

I am using pgr_version 2.6.3 I tried googling, most of the posts suggest the data is corrupted. So I tried pg_dump and select row by row to try finding the corrupted row, but did not encounter any ...
3
votes
0answers
37 views

PostGIS:Fixing tiny polygon features

How to write a query in PostGIS to check and fix case in picture: In the element_polygons I store the geometry geom.
1
vote
0answers
29 views

Data missing while importing .kml file to PostgreSQL using ogr2ogr

As I am newbie to both dealing with KML and PostgreSQL. I am able to load KML file to PostgreSQL. But feature data table is empty. My file structure is same as mentioned in link. while importing ....
0
votes
0answers
20 views

Interpolation of point data (postgis, geoserver) [duplicate]

I have a table in postgis with point data. A geoserver sql view layer is used to show a subset of these points (according to user selections). What I want is do is to interpolate these points (...
2
votes
1answer
24 views

Calculating Geoid Height (e.g. EGM2008) for Lat/Lon in PostGIS

Is there an existing method or best practice for calculating Geoid height for a lat/lon location in PostGIS? I don't believe there is an "ST_" function. I know that PostGIS makes use of ...
1
vote
1answer
36 views

Dealing with PostGIS WKB in PyQGIS

From QGIS I am running analysis on linestring geometry in PostGIS, and the result is updated geometry. I want to update the linestring only in editing mode of QGIS layer, so the user can decide ...
0
votes
1answer
46 views

Calculate average of the temperature value from 4 surrounded points in PostGIS [closed]

There are two-point tables. One includes temperature value and the other does not have this information. I would like to calculate the average of the temperature for the 2nd table based on the four ...
1
vote
1answer
29 views

Should ST_OrientedEnvelope results differ depending on order of transform?

I have a PostgreSQL db with a table with geometry multipolygons stored in srid 4326 (lat/lngs). I need to calculate the area of the oriented envelope around each polygon, and I am using ...
2
votes
1answer
38 views

Cannot convert shapefile data to PostgreSQL/PostGIS using ogr2ogr

I am a starter to use command-line interface. I was looking for a way to import a shapefile into PostgreSQL using "ogr2ogr". I was able to do this for point shapefile using code: ogr2ogr -f "...
4
votes
1answer
37 views

Postgis/Postgresql - Interpolate equadistant points based on weighted attribution similar to QGIS Interpolation(Heatmap Kernal Density Estimation)

I have equadistant vector points, that are all 400m apart but only cover certain areas of a map that have a value of (1-5). In QGIS I can run the Kernel Density Estimation with my vector points to ...
-2
votes
1answer
25 views

Draw trails/paths in CARTO

I'd like to overlay a trail or path on the map. I have the gpx set of points and I'd like to draw a path on the map.
0
votes
1answer
71 views

Which map projection is suitable for distance measurement purpose in USA?

I'm developing an application which uses PostGIS functions for measurements in the USA. In nutshell: the software is running in a car and use PostGIS functions in real time. For example: to measure ...
0
votes
0answers
19 views

ArcGIS, reproject a PostGIS feature class causes the LYR file to show the feature class as empty

My client has ArcGIS 10.2 and PostGIS with features classes in them. They also have a lot of LYR files that point to these features classes. When I reproject the features classes in PostGIS, the LYR ...
2
votes
0answers
54 views

Cannot create extension postgis_raster on CentOS 7.6

I am using CentOS 7.6 at work. One one server I have PostgreSQL 12 and PostGIS 3 installed from the pgdg12 repo. This is working fine for vector data, but now I would like to use it for raster data as ...
7
votes
2answers
140 views

Aligning line with closest line segment in PostGIS

I've got a road network dataset and a dataset that consist of multiple disconnected lines of varying lengths in PostGIS. Most of these lines are (largely) parallel to the road network, but the ...
1
vote
0answers
48 views

Run PyQGIS script always - in the background

How to always run a PyQGIS, in the background? In my case, I want to delete "feature A", the polygon, that have a "attribute X", if feature B, the lines, that have "attribute X" as well.
2
votes
3answers
42 views

Populate an empty raster with values from intersecting vector layers

I'm looking to populate a large, empty Unsigned 8-bit raster with integer values 1 to 10. The value depends on the spatial relationship between a given raster cell and a variety of vector layers (...
2
votes
3answers
130 views

Simplifying a multipolygon into one polygon respecting its outer boundaries

I have a multipolygon containing a one large polygon, itself containing a number of smaller polygons, which constitute 'holes' in the largest polygon. My goal is to simplify the multipolygon into one ...

1 2 3 4 5 146