Search Results
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 |
PostgreSQL is an open source object-relational database system.
14
votes
Accepted
PostGIS ST within does not exist
Your problem is that you have excluded the public schema from the search_path. All functions and types is in the public schema (by default)
So what you have to do is just include the public schema i …
11
votes
How to sum values of points inside polygons?
Edit:
field names corresponding to the questions field name
SELECT
polygons.id
, polygons.name
, coalesce(sum(points.value),0) AS sum
FROM polygons
LEFT JOIN points
ON ST_Intersects(polygo …
8
votes
Accepted
Postgres/postgis cursors
As I understand your question there is no need for cursors. This is a very common and simple task to do with simple sql. If we call your two tables roadsegments and adresspoints with fields like this: …
8
votes
Accepted
Performing polygon drilldown/overlay in PostGIS?
I think this works.
It is a windowing function, getting the difference between the intersection of each geometries intersection with the query box and the union of the preceding geometries.
The coal …
8
votes
PostgreSQL : total length of roads in polygon
SELECT wbn_uidn, sum(ST_Length(ST_Intersection(wgo_geom,wbn_geom)))
FROM wbn, wgo
WHERE ST_Intersects(wgo_geom,wbn_geom)
GROUP BY wbn_uidn;
7
votes
Accepted
PostGIS stored procedures
What you are talking about is not stored procedures but spatial inbuilt functions.
Those functions are very powerful and you can do most of the things that you do in a desktop gis directly in the da …
7
votes
Identifying road intersections using PostGIS
This is a little trickier than you might expect. That is because there is no good way in analyzing relations for more than pairs. You cannot put three lines into a function and ask if all of them inte …
6
votes
Centralizing shapefile data into database
Hallo
I would import it to PostGIS first. There is tools to load multiple shapes to individual tables. QGIS spit extension is one. The new graphical shp2pgsql in PostGIS trunk or experimental binarie …
6
votes
Accepted
Find the farthest point
If it would have been a few million points to check distance between you could consider using knn-distance with PostgreSQL 9.1 and PostGIS 2.0.
But I think you should do fine with something like? …
5
votes
Accepted
How to improve ArcGIS Desktop 10.2.2 and Postgres 9.2 PostGIS geometry performance?
If that is the query that is used I guess you are out of luck.
Is there no WHERE-clause?
I have never played with cursors, but as I understand the query, Arc-whatever fetches 1000 rows a time from …
5
votes
Accepted
Use Postgis to convert wkb_geometry data type to geom datatype
You already have the geom type. wkb_geometry is just the name of the column. I see it is a confusing naming since thebstorage isn't wkb but a internal PostGIS format that is quite similar to wkb. I gu …
5
votes
Accepted
PostGIS make line from shortest distance from points to polygons
ST_Shortestline is for that purpose
http://postgis.net/docs/ST_ShortestLine.html
ST_Closestpoint is actually a wrapper around ST_Shortestline
5
votes
Accepted
PostGIS ST_Contains Function Error
Edited
Take a look at the doc:
http://postgis.net/docs/manual-2.1/ST_Contains.html
Sorry, I misread your question first.
Interesting that it didn't work with your first syntax but with _st_contain …
5
votes
Accepted
Is there a way to calculate length of linestring from one point to another?
This is one way of doing it
Find out how big fraction of the line is between the 2 points with ST_LineLocatePoint and multiply that fraction with the whole length.
SELECT
(ST_LineLocatePoint(l,p2)- …
4
votes
Accepted
Qgis is slow with complex 'postgis query' layer. How to speed up?
Hallo
Is it the QGIS rendering that makes things slow or the PostGIS query. Is the query in the definition of a view or why does it need to med evaluated more than once?
If it is the PostGIS query t …