Tagged Questions

PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
1answer
100 views

PostgreSQL : total length of roads in polygon

I have 2 tables : wgo (lines) and wbn (polygons) With this code, I can display the length of each road inside a polygon. If I have a polygon with 2 roads in it, as a result I get 2 rows with the 2 ...
2
votes
1answer
314 views

PostgreSQL : finding all lines intersecting with a polygon

I am totally new in the world of GIS but as a student surveyor I am working on a project using postgreSQL and PostGIS. I have one database with all the roads of my country (lines), and one database ...
3
votes
2answers
289 views

Postgres Log Error

I am using Geoserver + GeoWebCache + Postgres for an application. On the application side there is no bugs but on postgres I am getting this log. Please explain and help me to solve this ...
1
vote
0answers
157 views

How do I catch PostGIS/PostgreSQL RAISE messages in QGIS?

I have a trigger set up in PostGIS/PostgreSQL which will show a RAISE WARNING when an inserted or updated polygon is within a certain distance of some predefined planning constraints. I want this ...
1
vote
3answers
136 views

How to set the tolerance value in pgr_createTopology function of pgrouting?

I am making a map based on the floor plan of a building. I made the shapefile and added it to the PostgreSQL database. I created the topology for the map using the following code: SELECT ...
1
vote
1answer
129 views

PostGIS ST_Within returns zero data

I am using PostgreSQL 9.3.3 & PostGIS 2.1.1 and I have a table Entries which has a column called "latlng" of geographic type (this column stores entry's latitude and longitude coordinates). I am ...
0
votes
3answers
215 views

Faster routing algorithm on pgrouting [duplicate]

I have downloaded data for india as a dbf file then converted it using osm2po to make it routable but the problem is when i make any routing query it takes a lot of time around 300 seconds and these ...
2
votes
2answers
130 views

how to Find n nearest lines for the given points from a collection of lines?

I have two tables, points and lines. For each point in point table, I want to find out nearest 3 points in the nearest 3 cables. I almost developed a query, but it is best suitable for single point, ...
2
votes
1answer
250 views

Postgresql table won't display in QGIS 2.2

I just downloaded QGIS 2.2 to check it out and now one (just the one) of the tables from one of my PostgreSQL database won't display. It loads just fine in 2.0. The records are all there (there's ...
0
votes
0answers
43 views

Speed drastically reduced when including geometry, is there a way to improve?

-- EDIT: Issue is that the shape files being used are at too small of a precision and way too large, output was 488M total, looking for different source -- I'm having some speed issues with a complex ...
7
votes
1answer
163 views

Replacing a corporate GIS [closed]

I'm looking at replacing our corporate GIS, this is the first time that I have had the responsibility of such a task despite my years of experience with the software as an end user. We will be ...
2
votes
2answers
90 views

self intersecting polygon SQl

I am trying to write a sql to query one land parcel for intersections between itself. I can do this fairly easy in QGIS using topology checker but i don’t know why this does not produce the correct ...
1
vote
1answer
117 views

Monitoring Geoserver for Production Environment

Is there any opensource server monitoring is available for Geoserver ? Like watchdog and nagios? Suppose if geoserver is stopped working whether mapmeter will automatically start it..Like the ...
0
votes
0answers
22 views

Postgres self self intersecting polygons and error

I have a land parcel which has self intersecting polygons and I am trying to create a view to select all the distinct polygons but sql query does not generate correct results. The polygon has 500 ...
2
votes
1answer
74 views

How to make osm2pgsql import a tag?

I loaded OSM data into PostgeSQL with Osmosis&Osm2PgSQL, and see many tags are missing. I need to make it import lanes tag. How can I make it save this tag too? edit: my solution was to copy ...
1
vote
1answer
67 views

Problem with runing a loop in a query in PostGIS

I am new to PostGIS and I have a question which can't solve. I have a table of buildings each having a value for number of people living in it. I would like to calculate the total value (sum of number ...
1
vote
1answer
129 views

Problem with nested query in PhP and PostGIS

I have a simple problem regarding a nested query. I would like to select all buildings in a given circular buffer and create a kml file of those selected objects. The following query does the job very ...
2
votes
3answers
137 views

Problem with result of query in PostGIS

I run the following query and irrelevant of the point coordinates and radius I always recieve all the records of the table I'm querying. Can anyone point out what the problem could be with this query? ...
4
votes
3answers
2k views

Installing Postgis on Ubuntu 12.04: unmet dependencies libgdal1

After sudo apt-get install postgresql-9.1-postgis I got that massage: The following packages have unmet dependencies: postgresql-9.1-postgis : Depends: libgdal1 (>= 1.9.0) but it is not going to ...
-3
votes
2answers
75 views

How can i create the spatial queries in QGIS? [closed]

please, Help me. i'll really appreciate your answers.
3
votes
3answers
184 views

Open Street Map: converting to country -> administrative unit -> city database

To moderators: If you think this question is too broad, please point me into right direction before closing, I'm desperately looking for help. I'm stuck on my task and I don't know what to do. The ...
1
vote
1answer
243 views

ST_Transform not converting from utm to lat/lon

This line: ST_AsText(ST_Transform(the_geom, 4326)) Returns the "coordinates" as utm coordinates. Although, I thought ST_Transform was supposed to convert the coordinates from utm to lat/lon. I ...
-1
votes
1answer
79 views

plypython set-up

I am trying to set up plypython on the following system: Windows 8.1 PostgreSQL 9.2 64-bit PostGIS 2.0 Python 2.7.05 I have added plpython2.dll to \PostgreSQL\9.2\lib When I run: CREATE ...
3
votes
0answers
84 views

How do I simplify the straight sections of (multi)Linestring in PostGres/PostGis leaving the curved sections untouched

I have (multi)linestrings containing upwards of 5000 points and I want to perform two simplifications possibly using Ramer Douglas Peucker or alternative methods in PostGis The (multi)linestrings ...
0
votes
0answers
38 views

display route from database(postgresql) on

For first part: Link i have postgresql9.1,postgis2,pgrouting2 and qgis2.2 this is the second part of what i need to do: Search in a database (postgresql with pgrouting) for a line from public ...
2
votes
2answers
260 views

Problem in running query on PostGIS using PHP

Would you kindly help me solving this problem. I'm trying to use the PHP code provided here in order to read geo-data from PostGIS. The code seems clear without any problem (also nobody has ...
2
votes
1answer
219 views

How to write a new layer to PostgreSQL from QGIS plugin

The PyQGIS cookbook states that QgsVectorFileWriter can write vector layers to any format supported by OGR: https://www.qgis.org/en/docs/pyqgis_developer_cookbook/vector.html#writing-vector-layers ...
2
votes
1answer
303 views

Most Efficient method of Storing Point Data in PostGres/PostGIS to later re-create a track

I am trying to determine the most efficient way to store point data in PostGIS to later re-create tracks Criteria: 1 second updates 100- 200 tracks active at any one time 1 hour max ...
1
vote
1answer
61 views

How to connect ArcMap 10.0 query layer to a different port?

I have an instance where I have a server that has postgres 8.3 and postgres 9.2 on it. I have the 8.3 version on port 5432 and 9.2 on port 5433. I want to connect to the 9.2 instance, here is a ...
2
votes
1answer
675 views

Add PostGIS spatial functions to a custom schema other than “public” in PostgreSQL

I am new to PostgreSQL and PostGIS. Recently, I created a PostGIS 2.0.3 database on a PostgreSQL 9.1 database server using pgAdmin. The "PostGIS" extension was found installed in "Extensions". Al ...
3
votes
1answer
339 views

Python Postgres Multiprocessing speed increase

I'm trying to speed up my PostGIS queries using multiprocessing. My current setup is using python and psycopg2 such as below. Although this has given a speed increase, it still seems like there are ...
1
vote
1answer
277 views

How to get mouseposition (openlayers) in decimal degrees?

I want to display the mouseposition in Degree Decimal rather than in meters. See my code: <script type="text/javascript"> var map, ia_wms; function init(){ map = new ...
3
votes
1answer
2k views

Loading Shapefiles into PostGIS using shapefile import/export manager

I am a complete beginner with PostGIS. I've started learning it using the tutorials provided by Boundless. In section 4 of this tutorial where I want to import shapefile in PostGIS, I do not have the ...
0
votes
0answers
126 views

PyQGIS + PostGis: FATAL: sorry, too many clients already

I searched for questions regarding this problem and hadn't find one. I'm developing a custom application with a map canvas to show some geographic information from a PostGis database. After some ...
2
votes
1answer
77 views

How to properly establish a PostgreSQL connection using QgsCredentials

I'm trying to establish a Postgres connection using QgsCredentials as described here: How to access user credentials in database connection? The only problem is that I cannot establish a working ...
0
votes
0answers
13 views

Prepare OSM file for PGROUTING use [duplicate]

Well I am new in the GIS World :p well I have a webGIS to realise and I want use OpenStreetMap. well the region I need wasn't vectorised so I modified it with JOSM ( Added Roads and buildings) and ...
0
votes
1answer
45 views

Is it possible to render POIs/landmarks from Postgres/postgis DB using google Map like icons?

Is it possible to render POIs/landmarks from Postgres/postgis DB using google Map like icons? Any readily available icon sets?
1
vote
2answers
1k views

How to perform SQL queries and get results from QGIS python console?

I'm writing a python script using QGIS API. I have to get results from postgres database table. The table has geometry field and other non-geometry fields. I want to perform SQL queries on ...
0
votes
0answers
27 views

OSM DataImported in to Postgres: What is the significance of “_gen0” and “_gen1” suffixed tables

Imported .OSM file to postgres/postgis (IMPOSM). Along with the table "osm_new_motorways" I see two more tables "osm_new_motorways_gen0" and "osm_new_motorways_gen1". Same is there for few other ...
-1
votes
1answer
40 views

Qgis 2.0 and conection with Postgres 9.3.2 [closed]

I tried conection with Qgis 2.0 with Postgres 9.3.2 but I was unable to do it. Is there anyone that help me Tks
3
votes
1answer
147 views

User locking postgres/postigs table without privileges

I have a PostgreSQL 8.4.4 database with PostGIS 1.4.2 and I am experiencing a problem where an external GIS system (using embedded CadCorp SIS 7.0) is connecting to the database and taking Access ...
1
vote
0answers
57 views

Reading lines within Bounding box failed

I am developing an application to display OSM data. In my scenario I need to display the data for one entire country. So my approach is that I will load curresponding countries osm data to postGreSQL ...
5
votes
2answers
436 views

How to check which version of GDAL do I have and how many?

I have installed in my computer and running the following software: PosgresSQL 9.3.2.3 PostGIS 2.1.1.1 QGIS 2.0.1 Dufour (this one installed through the OSGeo4w package) QGIS 1.7.0 Wroclaw I am ...
1
vote
0answers
59 views

PostGIS replace view crashes PostgreSQL server from ArcGIS script

I have the following script which when from ArcGIS (and a similar script from a QGIS plugin) will update a view. Every so often (around 1 in 5 times the script is run) it causes the PostgreSQL ...
2
votes
1answer
385 views

Multipoint vs point PostGIS

Is it normal to use the geometry type 'multipoint' instead of 'point' knowing that I use it to store only one point. How can I convert from multipoint to point
1
vote
1answer
142 views

Lost relation when importing from OSM to PostgreSQL with ogr2ogr

I am currently trying to import all administrative boundaries (countries, states, cities, etc) from OSM. I downloaded a small file from Geofabrik (Corsica), in order to run my tests. I understand ...
0
votes
2answers
52 views

how to specify -t critical dowloading raster with raster2pgsql

I'm trying to download a raster into postgres/postgis. So far I wrote: raster2pgsql -s 3006 -I -C -M -R filename.tif -F -t 463.313x463.313 schema.rastername | psql -h localhost -U postgres -d db ...
3
votes
2answers
184 views

Distance between Paris and San Francisco with PostGis (out of range coordinates?)

SELECT ST_Distance(gg1, gg2) As spheroid_dist, ST_Distance(gg1, gg2, false) As sphere_dist FROM (SELECT ST_GeographyFromText('SRID=4326;POINT(37 -122)') As gg1, ...
0
votes
0answers
52 views

Publish rasters stored in PostGreSQL with GeoServer [duplicate]

we are trying to publish some raster images stored in our Postgres database. First, they were generated from satellite images (spectral indexes). Then we uploaded them with raster2psql as tables. So ...
4
votes
2answers
389 views

clustering points in postgresql to create contour map

UPDATE: To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other ...