Tagged Questions
2
votes
1answer
46 views
PostgreSQL, find points near points
I'm going to have a database with a 'people' table and a 'shops' table.
I'd like to find all people within 500m of a shop, and details from both tables.
I'm used to working with mySQL, but I'm ...
4
votes
2answers
84 views
What are the benefits of using ArcGIS with Postgresql over simply ArcSDE?
I understand that in order to benefit from ArcGIS spatial datatypes (ST_GEOMETRY, versioned geodatabases etc.) ArcSDE needs to be installed - and with the 10.1 client it is automatically installed ...
0
votes
2answers
62 views
Cannot insert simple geometry data
I installed PostgreSQL 9.2.4 and PostGIS 2.0.3 on my Windows 8 machine. Then I created a table using phpPgAdmin and added a geometry column using the following statement.
SELECT ...
1
vote
1answer
44 views
SQL Command to convert pgRouting result to GeoJSON
My goal is to produce a Web UI for pgRouting using this tutorial. I have already imported my data from an OSM pBF to PostGIS using osm2po. Using the pgRoutingLayer plugin for QGIS, I was able to ...
0
votes
1answer
59 views
ST_Box2D in PostGIS 2.0
I am getting an error trying to create a bounding box of a geometry using ST_Box2D(). Is the function deprecated? If so, what is the equivalent function?
SELECT ST_Box2D(ST_GeomFromText('LINESTRING(1 ...
1
vote
0answers
114 views
Function for Selecting Points in a Polygon
I've been banging on this for a few hours, but since I'm relatively new to PostgreSQL and PostGIS, I can't find the solution. I'm trying to create a stored procedure (function) which will return all ...
2
votes
1answer
93 views
Given a lat/long point, determine if it's land or water?
I have a PostGIS-enabled PostgreSQL 9.1 installation with the 10M physical dataset from Natural Earth imported. It's been converted to 900913, and in QGIS I can visualize the data. So the plumbing's ...
3
votes
2answers
69 views
Traversing a PostGIS table tree
I'm developing a geospatial db for a company that operates at a number of large facilities. Its primary purpose is to help staff locate themselves and equipment within each facilities' multi-storey ...
4
votes
2answers
145 views
PostGIS stored procedures
I am wondering if there are open source applications that make extensive uses of the special functions (the ST_* stored procedures) provided by PostGIS? I found many apps that support storing map data ...
1
vote
0answers
124 views
SELECT DISTINCT from table in Geoserver SQL view [closed]
The postgis table I have has the following columns,
id | name | style_id | unique_id | time_stamp | the_geom(polygon)
and logically the unique constraint (not currently imposed in the db) lies with ...
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. ...
1
vote
0answers
40 views
given sets of vehicle passing on each edge, how to get most used vehicle to avoid transition?
I have two tables: one, the resulting table from converting osm.xml via osm2po so I can use pgRouting, and another one that contains information on what edges each public vehicle passes through ...
6
votes
3answers
132 views
Are there any open source Python modules compatible with arcpy that will allow complex SQL queries?
I am trying to handle string (non-geometry) duplicates in a large attribute table of a shapefile without having to convert to gdb and back or connect to a postgres db. I need to be able to use a count ...
2
votes
1answer
115 views
How to create a network with all the track points
I have created a sample network through the use of gps visualizer. Than I used the ogr2ogr function to import this data in my database.
Now I have a table which holds all the track points of these ...
0
votes
0answers
39 views
Possible to manipulate data in a postgres database with psql using JDBC or Python's psycopg2 with something else?
I ultimately want to manipulate data in a postgres database programmatically, and I am much more comfortable programming in Python than Java, but I'm not sure whether arcpy can ultimately use psql, ...
5
votes
1answer
135 views
Join based on maximum overlap in PostGIS/PostGresQL?
I have two sets of polygons in two tables. The sets overlap each other. For each polygon in set A, I would like to get the ID of the polygon in set B that it overlaps the most. I'm using PostgreSQL ...
6
votes
0answers
214 views
Getting ST_Difference between two different tables in postgis [closed]
One table has a series of grid squares in it, and the other has millions of voronoi polygons in it. I need to create a table that has the difference between the two of the them so that I effectively ...
3
votes
1answer
122 views
raster2pgsql: Strange error when creating a table
Hi GIS Stackexchange people,
When I try to load a asc file into my psql setup, I get a strange error message.
I have created the sql input file via
raster2pgsql -s 4236 -I -C -M gis_data.asc -F ...
0
votes
0answers
637 views
How to populate data from postgresql using dynamic php\html listing
In the form I created, I need two fields to be dynamically populated from the database while the other fields will be manually entered and push to the database. I have written a script that is able ...
2
votes
1answer
366 views
How do I format SQL queries for use in Arcpy?
I have to make an SQL query on a column having not adequat name "type_borne_id", I couldn't make SQL queries using arcpy.Select_analysis neither selectbyattribute, but when I use select_analysis ...
1
vote
0answers
57 views
Database has duplicate values after running pgrouting
I am a newbie with postgresql and sql statements so maybe it is a trivial question, I'm sorry for that.
I am working on a postgis database and try to use the pgrouting function. My goal is to store ...
4
votes
2answers
435 views
Publish SQL Views from Postgres/Postgis to Geoserver
I've trying and reading how to publish a Postgres/Postgis View in Geoserver. I know that I can create an SQL View in Geoserver, but I'd like to define the View in Postgres, not in Geoserver.
Does ...
3
votes
1answer
238 views
Duplicate ObjectID in ArcSDE Table
After making a check in from an arcpad AXF file, i remark that there's duplicate object ID records , this Arcsde pgsql table is versioned and edited by Axf checkins and a .net engine application. the ...
2
votes
1answer
159 views
Direct DBMS sql queries and ArcSDE geodatabase
i want to make updates from Arcobjects on several tables stored on a ArcSDE 10.1 versionned geodatabase based on Postgresql 9.0.5 , none of these update require spatial data , and making these updates ...
2
votes
1answer
110 views
Postgis nested query trouble
I am having difficulty writing a nested postgis query. I have a single table from which I need to create a view in PostgreSQL.
I have created the view with the following command
create view ...
4
votes
1answer
185 views
How to update attribute values of points outside an area?
I have two datasets in PostGIS 1.5 (on Postgres 9.1) one of polygons and one of points.
I am hoping to create a SQL command that will select all of the points in a dataset that are not within of the ...
4
votes
2answers
436 views
Changing Buffer table geometry dynamically in PostGIS using plain SQL
I have two tables in PostGIS, a point and a point_buffer table. The point table has a buffer_distance field, with a default value say 200. Now I want to change the buffer table geometry whenever I ...
0
votes
1answer
185 views
Running database operations against a stored GIS geometry
I'm using Quantum GIS and Postgres with the GIS extensions to store shapefiles that I'd like to run point in geometry and point in union geometries against. While it's easy to save and load the vector ...
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 ...
6
votes
1answer
685 views
PostGIS and invalid SRIDs
I'm having difficulty with a PostGIS query. I am trying to query my database (world_countries) using a bounding box drawn on a google web map. The objective of this query is to find any countries that ...
5
votes
2answers
319 views
Selecting POIs around specific buildings using PostGIS
The problem: I need to select, for each residential building in my table that has say at least 2 pharmacies and 2 education centers within a radius of 1km, all POIs (pharmacies, comercial centres, ...
4
votes
1answer
195 views
Sort by geometry using INHERITS?
hope everyone's doing well.
I have a statewide point data set (parent table: 600K rows, 500 columns) I need to analyze at multiple scales based on several different spatial divisions. I'll also need ...
4
votes
1answer
428 views
Error using ST_AddPoint for adding a new point to a polyline in PostGIS
I have two PostGIS tables, one where I store points, named "nodes" and another with where I store multilinestrings, named "lines".
I'm trying to append a new vertex to a line using one of the nodes ...
6
votes
2answers
2k views
Creating spatial tables with PostGIS
In the PostGIS documentation it says that there are two steps to creating a spatial table with SQL:
Create a normal non-spatial table.
Add a spatial column to the table using the OpenGIS ...
5
votes
1answer
267 views
Postgres/postgis cursors
I have a road network with StreetName and min/max address ranges for each segment (ie- StreetName = 'Main St', Min = 100, Max = 199). I also have individual address points with similar information ...