Skip to main content

New answers tagged

0 votes

PostGIS: Correct way of using ST_Union/ST_Difference with or without gridsize

I found some algorithms to remove the spikes that can be seen in the question, and for provided example it worked, but for more complex examples still st_touches is not working. I will leave the links,...
Bartłomiej Wierciński's user avatar
0 votes
Accepted

PostGIS: Correct way of using ST_Union/ST_Difference with or without gridsize

Using a grid size argument in the overlay functions is a good way to avoid the spikes that you are seeing in the full-precision results. ST_Touches is a very specific spatial situation. It would be ...
dr_jts's user avatar
  • 5,283
2 votes

ST_DWithin rows underestimated

You placed all 2000 of your generated points on a diagonal line running in 0.0005° steps North-East, the furthest one sitting 1° or 131_198 meters away. Only 16% of your points stick out the 110_000 ...
Zegarek's user avatar
  • 787
1 vote

Point within polygon in a certain distance of "point on surface"

You can draw a circle around your point, take its intersection with the polygon and ask for a point on that - ST_PointOnSurface() works fine on lines: demo at db<>fiddle select ...
Zegarek's user avatar
  • 787
1 vote

PostGIS data with serial id doesn't automatically calc a proper id when adding new geometry

found a way: thanks to Auto-increment id when adding a feature to a PostGIS layer in QGIS where using the data type BIGSERIAL is suggested in this way: ALTER TABLE your_table ADD COLUMN idcolumn ...
robert tuw's user avatar
0 votes

Combining (merging) neighbour points to one centred point in PostGIS (reducing density)?

You could implement grid-based clustering with representative points. It's described in this answer: https://gis.stackexchange.com/a/352703/14766
dr_jts's user avatar
  • 5,283

Top 50 recent answers are included