Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 132394

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

1 vote

Comparing two tables, using PostgreSQL Intersect (on PostGIS geometry)

If you want to know if two geometry are geometrically equal. You should use St_equals which is the standard to get this information. So let's say you have two table and you want to know if they are t …
Maximilien jaffrès's user avatar
1 vote

Distinguish features by distance

I had a similar things to do with elevation lines and i used ST_union but before that i made a cluster of each subset you need to gather. So you can add an id of touching segments and then go for yo …
Maximilien jaffrès's user avatar
0 votes

Calculating nearest point from a road, its name, distance and what road it intersects

maybe you can try to add another time the road table and look for St_intersects with restaurant geom ... something like this : SELECT c.name, a.name, b.name, ST_Distance(a.geom, b.geom) AS distance …
Maximilien jaffrès's user avatar
3 votes
Accepted

Finding a center of polygons, and its coordinates

If i am not mislead by the doc of St_centroid You will get this answer by using St_centroid even with multi geometry. this will render the center of each multi ponderated by area of each components …
Maximilien jaffrès's user avatar
0 votes

How to get the intermediate points between a route origin and destination?

I'll try to give an answer that covers generally your issue. So let's say you have a table of points called "clients" and another table called "stores" for store. one of the issue is to know how yo …
Maximilien jaffrès's user avatar
0 votes

How to find measure from geometry using PostGIS or GeoServer (Linear Referencing)

St_Distance combined with St_StartPoint of your linestring should do the trick you are looking for in PostGis/PostGres. … Now the problem is that you need to retrieve the click's coordinate to produce a point geom if you want to do it in PostGis. …
Maximilien jaffrès's user avatar
3 votes
Accepted

Save PostGIS login informations in QGIS

If you want to save the connection settings to your PostGresql database to avoid typing your password every time in Qgis. You can use a pgpass configuration file : https://www.postgresql.org/docs/cur …
Maximilien jaffrès's user avatar
1 vote
Accepted

Setting a buffer around a road and visualizing it in QGIS

Your query create two geometries, so you need to tell Qgis what is your geometry column when you load your table (or either don't select a.geom) when you load a table with two geometry column in pos …
Maximilien jaffrès's user avatar
3 votes
Accepted

Creating 3D geometry column by combining existing 2D geometry column with "elevation" column?

With the elements we have here, I'll show a way to transform MultiPoints and Point geometrie and add the Z information in your geometry. create table public.multi_test as ( SELECT ST_GeomFromText('M …
Maximilien jaffrès's user avatar
4 votes
Accepted

Remove holes from polygon

so i took the data given by Hugh_Kelley and i was able to find a good postgis solution. I imported both shapefiles in PostgresSql and used this query. …
Maximilien jaffrès's user avatar
1 vote
Accepted

Django: how to set all of the model's fields using LayerMapping?

I am not super familiar with django and LayerMapping. But if you look in the doc here : https://docs.djangoproject.com/fr/3.1/ref/contrib/gis/layermapping/, mapping is actually a dictionary that match …
Maximilien jaffrès's user avatar
1 vote
Accepted

Finding nearest point of route using ST_DWITHIN

I will propose this query : with raw_data_roads as ( select ST_Collect("inputstreetpoints") as line), res as ( select ST_ClosestPoint(raw_data_roads.line,ST_SetSRID(ST_Point({latitude}, {longitude …
Maximilien jaffrès's user avatar
12 votes
Accepted

Finding self-intersection in PostGIS

Did you think about adding a where St_IsValid(geom) = False ? This may avoid to look for geometry wich are valid and then doesn't have self intersection issue. If you have performance issues, be sur …
Maximilien jaffrès's user avatar
2 votes
1 answer
489 views

QGIS, creating layer from PostGIS : add a style

I am creating some layers in QGIS using PostgreSQL connection. I have a python plugin doing the load of the layer in Qgis, this part of the code looks like this : uri = QgsDataSourceURI() …
Maximilien jaffrès's user avatar
1 vote

GRASS GIS: Execute SQL query and save output

b.id IN ('100', '101') ) this way you will create a table with the desired output that you may view with Qgis extensive tutorial for Qgis + PostgresSql use : https://www.line-45.com/post/using-qgis-postgis-dynamic-duo …
Maximilien jaffrès's user avatar

15 30 50 per page