Skip to main content

New answers tagged

1 vote

Tiles getting generated in both PostgreSQL and gwc directory?

The disk quota database does not store tiles, it just stores a ledger of how much space the tiles use on disk, and how frequently/recently they have been accessed. When the quota is reached, this ...
Andrea Aime's user avatar
  • 17.5k
0 votes

Using UUID as feature ID for MVT tiles (PostGIS)

I know I'm a little late to the party here but I recently came across a similar situation with Postgis. Also using maplibre-gl-js. So posting in case it helps anyone. At the end of the day you have to ...
NickStafford's user avatar
0 votes

PostGIS doesn't use spatial index with ST_Intersects

In my case, the index was not working because dynamically created ST_Buffer in CTE was a type of geography, had to cast it to geometry. Then the index worked. WITH rut AS ( SELECT ST_Buffer(lines.line:...
Mateusz Falkowski's user avatar
0 votes

How to modify a feature's JSON attribute on PostGIS with QGIS

Unlike jsonb, the regular json type is pretty much just a pre-validated text. You could alter table your_table alter column connectionpoints type text using (connectionpoints::text) --,add ...
Zegarek's user avatar
  • 712
1 vote
Accepted

gpkg filename to add PostGIS table field

You can use the -sql flag to create arbitrary columns in the output. I've not got a PostGIS handy so I'm going to add to an existant table.gpkg file. It has 5 rows and the file column is all "nc1&...
Spacedman's user avatar
  • 65k
0 votes

Calculate volume of space defined by multiple overlapping 3D polygons

Assuming the 3D objects have a standard z-value and are not irregular in height you could create a layer that is a footprint/simple polygons of the objects. You could then perform a simple intersect ...
anthro_01's user avatar
0 votes

How to get User and Password of a PostGIS layer from PyQGIS

In QGIS3 you can do the following: layer = iface.activeLayer() if layer.providerType() == 'postgres': uri = QgsDataSourceUri(layer.dataProvider().dataSourceUri()) password = uri.password()
juliustoth's user avatar
2 votes

Merging PostGIS tables with billions of rows

Is CTE + union all + case statements the best way to join multiple tables? You can simplify that to just two full joins: demo at db<>fiddle select*from pop.children full join pop.men using(...
Zegarek's user avatar
  • 712
1 vote

Plot a GPS track color-coded by the altitude (or any other value like speed, ...)?

I had similar concerns, and although it's not perfect, I found a way to express speed in lines. Create a buffer by referring to the line in the gpx file and then change the buffer to a line using [...
alqs's user avatar
  • 11
0 votes
Accepted

"addr:street" seems to be missing after using osm2pgsql to load data into postGIS

Just to close up the topic, and maybe helping other people struggling like me in the future : (Disclosure, what I say might not be accurate, being currently learning the tools) The data is being ...
Volantis's user avatar
0 votes
Accepted

ogr2ogr from PostgreSQL-Installer on Windows without PostgreSQL-Driver

The windows installer from Enterprise-DB (https://www.enterprisedb.com/downloads/postgres-postgresql-downloads) has the ogr2ogr / ogrinfo included but without the postgres-driver. Not since Postgres ...
leole's user avatar
  • 317
0 votes

ogr2ogr doesn't find PostgreSQL driver (Windows)

I my case on my windows machine with locally installed PostgreSQL-Server it did not help to quote the connection-String-components. To emphasize the above comment from @slambeth (see above: The ...
leole's user avatar
  • 317
1 vote

Creating smaller equal sized and orientied polygons in existing grid polygons

As per the comment: starting from PostGIS 3.1 there's ST_SquareGrid() that does that. If I draw a large square over Vancouver and ask it to divide it into 402.33m by 402.33m squares, it does that ...
Zegarek's user avatar
  • 712
5 votes
Accepted

PostGIS ST_ClusterDBSCAN returns NULL

DBSCAN is a 'density-first' (my own words) algorithm, meaning that it requires a base density of minpoints (but including itself) within eps distance of each other to declare a cluster of core points -...
geozelot's user avatar
  • 30.4k
1 vote

Calculating the Oriented Bounding Box (OBB) of polygon or point set

Currently, there are two great implementations of this for Python and PostGIS. Python The shapely Python library provides the oriented_envelope method. There's the alias named ...
marquesine's user avatar

Top 50 recent answers are included