PostgreSQL is an open source object-relational database system.
3
votes
1answer
142 views
Merging multipolygon data into a polygon
I have a MultiPolygon representation of some shapes in POSTGIS, I am trying to convert them to Polygon data.
I tried, st_geometryn(r.geom, 1) but that didnt work because the way polygons are ...
2
votes
1answer
65 views
How to configure and install psycogpg2 - beginner?
I need to install psycogpg2 for working with 'django'.
I read the instructions but I dont understand whether to run the commands in command prompt or in python command line. I am lot used to the GUI ...
2
votes
3answers
208 views
PgRouting routing algorithm from start to end via nodes with restrictions
I have the following situation:
I want to find the shortest route from A to B through nodes (C,D,E, etc.) with turn directions and road type filtering.
Is there a way to accomplish this using ...
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 ...
2
votes
2answers
673 views
Why am I unable to publish a postgis layer to geoserver?
I left arcgis and microsoft sql and now I am trying to connect Qgis+PostgreSQL (PostGIS) + GeoServer.
I've brought my postgis database to the server, created a "store". And now I'm trying to publish ...
29
votes
7answers
2k views
Best practices for PostGIS production environments?
What PostGIS documentation have you come across that has been helpful when tuning PostGIS for a production environment?
I would like to get together with my DBA to setup a Postgresql/PostGIS ...
3
votes
2answers
258 views
PostGIS - incorrect result distance between two points
I am quite confused the way PostGIS is returning the result for this basic query.
So I am trying to find the distance between two points
45.2714,71.2087 and 42.3739,66.39
and the distance should be ...
7
votes
2answers
7k views
How to insert a point into postgis?
I have created one table in my Postgis. But I can not insert point. I do not know what's wrong with my query?
CREATE TABLE app (
p_id INTEGER PRIMARY KEY
);
SELECT ...
0
votes
0answers
129 views
ajax not working with postgresql
I know is a silly question but I thought I should ask since you guys know more about postgresql. Sorry for being analytical, but I think its the only way to make my question clear.
I'm using ...
1
vote
0answers
120 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 ...
1
vote
2answers
99 views
mulitlinestring to linestring
I am using postgres with postgis and I have a set of points which I would like to interpolate with a set of lines.
Now my problem is that the set of lines are of type multilinestring.
Is there a ...
2
votes
3answers
335 views
Which open source software to create desktop interface for Geo-processing tools?
I want to create an desktop interface to create geo-processing tool and that to using Open source GIS software. I will be using Postgresql and postgis too to save and retrieve data for operations. I ...
4
votes
3answers
234 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. ...
2
votes
0answers
55 views
Pgrouting can't find postgresql (on Mac)
I've installed both postgreSQL 9.0 and postgreSQL 9.1 on my mac, using binaries from http://www.kyngchaos.com. I also have postgis 1.5 installed.
I tried to install pgrouting, again using binaries ...
3
votes
1answer
80 views
PostGIS Trigger doesn't work
The trigger below don't works and I need that when a new pipeline (adutoras) is inserted or updated, the procedure check what are the municipalities (municipios) that intersects the pipes and put the ...
1
vote
1answer
85 views
Intersecting 3 tables with Spatial SQL
I have three tables I need to intersect but not sure how to get the third
Heres what I have so far:
SELECT nyc_neighborhoods.name, SUM(nyc_census_blocks.popn_total) AS POP
FROM nyc_neighborhoods
JOIN ...
1
vote
1answer
55 views
Ordnance Survey TOIDS: converting from strings to integers
I'm planning to load a number of OS datasets into Postgres/PostGIS.
In order to save space and speed up queries, I'd like to strip the 'osgb' off the front of the TOID strings and then store the ...
0
votes
0answers
50 views
how to group interconnected edges inside a table?
Given a table and a random set of edges with source and target columns, how can I find out which edges connect with each other and then group them together using PostgreSQL?
1
vote
0answers
39 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 ...
1
vote
0answers
115 views
pgrouting shortest path result in wrong order
I am using the Dijkstra shortest path algorithm to plot a route between two points using the latest version of pgrouting in postgresql 9.1 with postGIS 2.0.1.
I am able to get a correct result ...
1
vote
2answers
65 views
Is it possble to set a PostgreSQL schema and table name as a variable in Mapserver?
In Mapserver it is possible to set a variable when connecting to postGIS. This way I have created an fill-in form where you can enter a postcode and then you get a result.
How can do this with ...
3
votes
1answer
156 views
Transit Routing using pgrouting as core routing engine?
i'm a student and i'm working on a project. the aim is given two sets of coordinates(origin & destination) route through the map to determine the optimum path using public transportation and of ...
2
votes
2answers
132 views
Can I import a .gml file into Spatialite in QGIS?
I have some Ordnance Survey Address Base data files which have a .gml extension. I have imported them to GGIS as vector layers along with some mapping data but would like to explore them with ...
0
votes
1answer
183 views
Eclipse can't find Driver.class from postgresql-9.2-1002.jdbc4.jar file nor AbstractJdbc4Connection class
I am using the jar file in my configuration path after following the example from postgresql/jdbc tutorial. But after I added the jar file and configured it for my reference library when I run it I am ...
0
votes
1answer
83 views
Failed to delete a domain from the database
I am trying to delete a domain I am using from ArcCatalog -> Feature Class Properties-> Subtypes-> Domains. But when I try to do that I get this error message:
"Failed to delete a domain from the ...
5
votes
2answers
151 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 ...
1
vote
1answer
54 views
PostgreSQL query selection in MapServer is not working?
When I make a selection in the query in Mapserver I got a blank page.
The query I use is:
DATA "geom from (select * from bagmutlijst_201210.vo_gepland_gemeente where gemcode = '0141') as selection ...
2
votes
0answers
80 views
What means the gdal_translate message: “Too many command options”? [closed]
I have a little question, regarding the gdal_translate-utility:
I want to extract raster-files from database-stored gridfiles using the gdal_translate:
gdal_translate -ot Float32 -of SAGA PG: ...
0
votes
0answers
43 views
How to format spreadsheet to input point data for later import to PostgreSQL
I want to create a spreadsheet to hold data from our cemetery. I will use the spreadsheet to get the data into a PostgreSQL database. What I dont know yet is the format that the point (positional) ...
1
vote
1answer
289 views
error performing wfs-t insert in postgres 9.1.4
I am getting error performing insert exception while performing wfs-t insert operation when i use postgres 9.1.4 and postgis 2.0. but i get successful insert when using postgres 9.0.1 and postgis ...
6
votes
3answers
128 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
113 views
Update query does not affect any rows, privileges are set to public and allow all actions
I've been trying to update a column of integers called level_dept in a table called adminboundaries within the sql query tool on pgadmin3 and the query runs and finishes with a lot of lag, but 0 rows ...
4
votes
1answer
166 views
postgis create geom from lat long
I ran this query successfully, but the column highwayid isn't updated as expected:
update unique_latlongs set highwayid =
(SELECT h.osmid FROM rn.highways h WHERE h.geom &&
...
2
votes
4answers
247 views
Any pgrouting enabled hosting providers?
I am really interested if any of you know about a hosting provider that offers postgis & pgrouting pre-installed?
If not, can I just go ahead and purchase a linode hosting account and do all the ...
5
votes
2answers
93 views
How can I join a spreadsheet to a point layer?
I have a layer with point data for the grave positions in our cemetery. We are gathering data from each headstone. If I enter the data to a spreadsheet can I later associate the spreadsheet with the ...
2
votes
1answer
106 views
Why is pgrouting astar not consistent?
I route from 1 end of a circular route to the opposite end. Visually it is obvious that going clockwise is shorter, however shortest_path_astar sometimes picks clockwise and sometimes anti-clockwise.
...
16
votes
1answer
153 views
Can we create views over a raster table in Postgis2.0?
Is it possible to create PostgreSQL views over a table that contains raster data?
I have succeeded in creating the view but the entry in raster_columns is not correct (all the raster info is ...
0
votes
2answers
304 views
slow import via osm2pgsql to postgresql database
I try to import berlin.osm (33Mb) into the postgres database 9.1 via osm2pgsql. My desktop is mem 2Gb,proc 2Ghz,hdd 60Gb, RHEL6u2x64. This process is so slowly in particular when I'm going over ...
4
votes
3answers
65 views
GIS QUERY on point and buffer
I have a point table and the buffer geometry is created around the point.
I have defined the if the point is within the buffer_distance then its value is =1
and if it is outside the buffer its value ...
-2
votes
1answer
64 views
How do I set the protocolVersion using the jdbc postgres driver? [closed]
I attempted to concatenate a string to the url parameter of the below in order to set the protocolVersion, but I'm not sure how to keep the string in the url without altering the name of the database, ...
2
votes
3answers
124 views
how can i use the postgresql's Geometric Types
How can i implement Geometric Types in postgresql db..
Postgresql db is hosted in windows os.. and how can i get whether point is in circle or not?
getting errors when i am using predefined ...
3
votes
1answer
100 views
Creating a vector based design from a raster database
I have a raster table that I've created using Postgis raster. It has 365 records and the table looks like this:
+-----+------------+---------+------------+
| rid | rast |filename |date_of data|
...
3
votes
2answers
224 views
Why does Ogr2Ogr Postgres import fail?
I have a lot of S57 files that need to be imported to PostgresDB. The process takes over 2 hours. In order to improve performance, I have tried using PG_USE_COPY to use copy instead of DB inserts. I ...
3
votes
1answer
113 views
Parse error while inserting values into polygon feature
I created a polygon as follows
create table boundary (id int, name text);
table created;
select AddGeometryColumn ('',boundary', 'latlon' 4326,'POLYGON', 2);
geometry column added;
then i'm ...
12
votes
4answers
337 views
What is a suitable Global/Universal Unique Identifier for a PostGIS database?
I have read that using OIDs as a primary key in a postgreSQL/PostGIS db is poor practice because there are instances where these can be reset. Sounds logical, but then what is a suitable alternative? ...
8
votes
2answers
388 views
Postgres/Postgis spatial index - no speed up
I have a spatial table in a postgres/postgis database. Every row in it represents a Polygon. It is of following form:
+----+--------+
|gid | way |
+----+--------+
|241 | 01030..|
The geometric ...
0
votes
1answer
72 views
Column exists in DatabaseMetaData, but does not exist in relation?
I am using JDBC to query a PostgreSQL database. And I want to populate a column called wiki_url based on the value of another column, level which will determine which value of 5 columns to concatenate ...
3
votes
1answer
296 views
ArcGIS Server 10.1 and Postgres Geoprocessing Service issue
I'm hitting an error when publishing a model from ArcGIS Desktop 10.1 to ArcGIS Server 10.1. The model I want to publish uses a layer from a Postgres DB defined via a Query Layer in my MXD. The ...
1
vote
1answer
181 views
Broken image from mapserver, png not rendering
I'm trying to render WMS MapServer data on top of Google Maps using the OpenLayers JS library. My problem arises when I try to render the data as a series of points throughout the New York City area. ...
1
vote
2answers
259 views
How to project a geoJSON file in OpenLayers?
I have a json file well formed. I want to read a json file as a base layer from OpenLayers.
<script type="text/javascript">
var styles = new OpenLayers.StyleMap({
...







