Tagged Questions
1
vote
0answers
15 views
Select features within a country or bounding box effectively using PostGIS
I imported the planet OSM file into a PostgreSQL 9.2/PostGIS 1.5 server using osm2pgsql. I now want to select certain map features which lie within the bounding box formed by a countries borders, e.g. ...
0
votes
2answers
31 views
PostGIS, distance between two users
I have a simple table (location_test) with three column (name, geom , jid). geom is a geometry column with SRID 27700. I set the user's geometry position with:
UPDATE location_test SET geom = ...
0
votes
1answer
68 views
In QGIS can I show just the lines in a Postgis query? How can I do that?
I have three tables in Postgresql, each table with one layer of lines.
I want to show the path of an initial line to another final. Is it possible executing a SQL query?
Thanks
My three tables are ...
3
votes
1answer
85 views
How to Find points in a Kilometre radius
I am new to PostGIS and GeoData.
I need to find where the lightning has stroke by a period of time and kilometre radius based on a given location.
I have given lon/lat and my table is:
latitude ...
4
votes
1answer
161 views
How to speed up an st_intersects() query?
I have a "huge" spatial database: 72GB, 200 millions documents with geometries (points)
I have a GIST index on the geometries
the database:
CREATE TABLE resources
(
id bigint NOT NULL,
accuracy ...
4
votes
3answers
263 views
How to join two tables using date, time, lat and lon as common field?
I am sorry if the question is elementary but I did not find any clear discussion or guide to understand how to run a query in postgresql. So that a pointer to another website would be also useful. ...
5
votes
2answers
163 views
PostgreSql query problem with aggregate functions
I need help with a PostgreSql query. I need to find all parcels which have bigger area then average. I'm using this query:
SELECT OBJECTID
FROM parcela
WHERE ST_Area(geom)<(SELECT ...
2
votes
1answer
117 views
How to filter or query data in GRASS?
I have a PostGIS dataset with just over 2 million rows. Each row has a PostGIS geometry point value and several attributes.
I'd like to do some analysis on certain subsets of the data, but I can't ...
2
votes
2answers
176 views
Spatial index to speed up the query
I have spatial table in PostgreSQL 9.2 / postgis 2.0 that I have to extract some information from it. But my query is hopelessly slow. How could I make use of spatial index to improve the performance ...
3
votes
2answers
126 views
Multiple queries in a row
I have osm data imported into PostgreSQL with osm2po tool (wich makes the data routable). Also I have imported data relationed with nodes and node_tags with osmosis tool.
I need to obtain a set of ...
4
votes
1answer
205 views
Improve database performance for geospatial
I have a database with osm data imported with osmosis tool. I want to search for the nearest POIs from a given point. For this purpose, I perform this query:
select id from nodes
where ...
3
votes
1answer
608 views
How to find the nearest point by using PostGIS function?
table A:
lat | long | the_geom | code | sign
13.8433095 | 100.6360357 | 0101000020E61.... | ABC | start_point
13.7544738 | 100.5459646 | 0101000020E6..... | ABC | end_point
13.4124215 | 100.6232332 ...
6
votes
3answers
148 views
How to select only Spatial tables from the postgres database?
My database contains both Spatial and Non-Spatial tables, but I want to retrieve only Spatial table from the query.
Any suggestions to select only Spatial tables. 'the_geom' is the geometry column in ...
3
votes
1answer
860 views
How do I perform a proximity search with Postgis?
OK, so I downloaded the Geonames database (cities1000) and wrote a small Ruby program to import them into my table (geo_cities). I then added geography column called geog.
So after all of that, I ...
3
votes
3answers
2k views
How to fix performance problem in PostGIS ST_Intersects?
I'm a newbie in postgis and I have a problem in query performance.
This my query:
SELECT DISTINCT ON (userid) userid ,ST_AsText(position), timestamp
FROM table1
WHERE ST_Intersects ( ...
2
votes
1answer
1k views
Basic MapServer query of PostgreSQL/PostGIS database
I've just installed MapServer on a linux server and I am trying to understand how to display a basic map using a PostGIS database. I have displayed a shapefile in the browser, so I know that the ...
11
votes
1answer
415 views
Nearest Neighbor Grouped Selection in QGIS
OK - so I have an interesting problem I am trying to solve. I have a list containing over 100,000 points in lat/long format which I have imported into qgis.
Now, what I am trying to do here is group ...
0
votes
2answers
635 views
QGis import partial PostGIS layer using query builder
I'm sorry, but I'm terribly new to the GIS scene (and PostGIS & QGis). I have loaded a whole bunch of OpenStreetMap data into a PostGIS database and successfully drawn a map using Mapnik. Now I ...