PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
0answers
18 views

Importing tif image from PostgreSQL Database to webpage

I am trying to import tif images from PostgreSQL Database to my website. In the website, I need to make a button control which will open the images. I think I have to use Pyhton as a server side ...
0
votes
2answers
55 views

Why the execution of a query is very slow using PostGis?

I'm applying this Query to 8257800 point but it's taking 15 hours and it didn't return a results. SELECT a.gid , b.gid, st_distance(a.geom,b.geom) FROM shp1 a, shp2 b where ...
1
vote
0answers
18 views

OS Terrain 50 into Postgresql/PostGIS for lat/long analysis

I am performing analysis using line of sight's and followed a very useful blog post at http://davidrowley.blogspot.co.uk/2013/08/calculating-line-of-sight-with-postgis.html which detailed how to load ...
0
votes
1answer
27 views

moving user by gps and show interested points

Is it possible in a Web application with google maps, to use a user his mobile gps and when move and is near on an interest point such as hotels, interested point i have stored in a Postgresql ...
1
vote
3answers
45 views

Create Statewide Hydrologic Soil Group Map

This may be better for Engineering? Not sure. Background: Previously I have downloaded SSURGO soil data for the state of Pennsylvania by downloading each county and merging the shapefiles. I then ...
0
votes
1answer
30 views

Create blank table from unix shell

I am in the middle of trying to create my first PostGiS database and seem to be running into problems developing scripts to automate importing the various spatial formats so I can use them in my ...
1
vote
2answers
246 views

Create shapefile from data PostGIS or KML using Java

I'm working on a geographic information system project, whose products form shapefiles. I am using the Java programming language and a PostGIS database. Is there a way to generate a shapefile from ...
0
votes
0answers
35 views
+50

KNN combined with other clauses

I have a table with columns:- wkb_geometry (geometry), road_id character varying, year INTEGER The data set has multiples of road_id across many years. I want to get the nearest 10 values to a ...
0
votes
2answers
72 views

Dynamic connection between Mapinfo and a database

I'm trying to create a dynamic connection between a database and a Mapinfo table. My database countain only one table, with a list of bus stops, characterized with their ID, name, and X Y coordinates. ...
0
votes
0answers
32 views

Import OpenStreetMap to shapefile in ArcMap

I would like to import an osm file to a postgresql in order to be able to extract soe information and convert it to a shapefile. I have downloaded the PostgreSQL. My question is what are the main ...
0
votes
0answers
27 views

View of relationship in pgAdmin III using QGIS? [closed]

I created the entity–relationship model in pgAdmin III. I imported the database in QGIS. Is there some way in QGIS to view the relationship between the entities? Or I do I need to create all of ...
1
vote
0answers
55 views

Connect to PostGIS database from Q GIS

I am having trouble connecting to a postgresql database hosed on my local host. I have gotten a python script to connect and connected through the command line, but for the life of me cant connect to ...
0
votes
1answer
34 views

how to insert coordinate of province to postgresql?

i need insert to database this area sample: [ [ [ 50.227886556627098, 31.15709614260982 ], [ 50.227886335531331, ...
0
votes
0answers
20 views

OSM2PO get all nodes included in a segment

We have been working with osm2po tool to load data to a Postgis Database. We would need all the nodes included in a segment not just the source and target node. Is there any way to change the ...
0
votes
0answers
35 views

Configuring Apache Tomcat for WFS-T? [closed]

I am trying to develop a web-mapping application using GeoServer, OpenLayers and PostgreSQL. I have achieved much of the required work. But i am late for editing the layers( delete, update,insert), ...
6
votes
2answers
143 views

What controls the direction of TopoGeometry Linestrings?

In PostGIS, what if anything controls the direction that topogeometry LINESTRINGs will have when converted to geometry? It doesn't appear to be the order in which the edges are listed in the call to ...
1
vote
2answers
168 views

Getting OSM maps in Equirectangular Projection via osm2pgsql

I'm trying to import some OSM data into psql as equirectangular projection using osm2pgsql with the following command: osm2pgsql -c -d osm -S /usr/local/share/osm2pgsql/default.style -l ...
2
votes
1answer
263 views

How to extract a single road from OSM GIS Database?

Is there a way to extract a single row out of the OSM-GIS-Database (by a Query)? It would be so much easier if I could find an EER Model of the Database. I was searching a long term and found very ...
0
votes
1answer
17 views

Creating network for pgRouting from set of multiline strings?

I have a table which is a set of multiline strings. I wish to create a pgrouting topology from that table so I can do shortest-path problems. I have tried pgr_createTopology but it failed. Is ...
0
votes
2answers
210 views

How to update postgis layer from shapefile in QGIS?

My usual workflow with updating layer from shapefile was to: Open DB Manager; Load SHP files into QGIS; Open DB Manager; Import file (with drop option). Now my problem is that I have created ...
1
vote
1answer
128 views

Install pgRouting on Postgres 9.1 and Win 32

I referred some documents on GIS-stackexchange and over internet regarding installation of pgRouting on Postgres v9.1 and windows 32. I am not getting the correct version of pgRouting to install. Can ...
0
votes
1answer
46 views

Database queries using GeoServer? [closed]

I am new to GeoServer. I have a PostGIS database and GeoServer setup. How can I query the database using the GeoServer/ Boundless SDK? I have OpenGeo Suite 4.6 and I am trying to query the database ...
0
votes
1answer
33 views

import OpenStreetMaps Data fails

I work in project of geocoding so i want to import the OpenStreetMaps Data. i created a database and name it nominatim and i tried this command: sudo ./utils/setup.php --osm-file ...
2
votes
1answer
58 views

How to efficiently use a Postgres DB with Python

I have a Postgres DB with a lot of lines that are too long and so now I want to split those lines into smaller ones. This is why I started writing a little python script for that job. Basically it ...
0
votes
1answer
163 views

Shp2pgsql - exec() not allowed on external server

Me and my collegue are using the shp2pgsql and psql commands in php code (a Drupal module to be precise). We put these commands in a php variable and use the exec() command to execute them. This ...
0
votes
0answers
31 views

Merging linestrings in QGIS using PostgreSQL and PostGIS

I've to merge all linestrings from a PostgreSQL table "river" where not more than two start/-endpoints are overlapping. In the illustration below I use a "M" to mark all linestrings that needs to be ...
0
votes
1answer
22 views

Get percentage based on counts

I have the following query which gives me two columns store and customer_count...one row per store. SELECT a.id AS store,count(b.*) AS customer_count FROM stores a, customers b WHERE ...
1
vote
2answers
222 views

Error inserting GeoJSON in PostGIS

I know there is a similar question but I am getting a different error and none of those answers have helped. I am trying the following query (the GeoJSON itself is from the PostGIS website. INSERT ...
2
votes
3answers
1k 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 ...
2
votes
4answers
127 views

PostGIS doesn't use spatial index with ST_Intersects

I imported the data from openstreetmap using osm2pgsql and copied it another table structure. If I made a query for containing rows using st_intersects, st_contain or someone else, postgis don't use ...
1
vote
1answer
42 views

Running spatial query on huge table [duplicate]

I've got two tables conatining geometry: 1 containing big polygon's (regions, srid=4326) and another containing smaller polygon's (pand, srid=28992, containg ~9.9milion rows) By using one of the big ...
2
votes
1answer
64 views

Is there a way to improve the time for opening a QGIS project?

We have a QGIS project using postgresql database "made with" osm2pgsql. The database is about 68GB. Our Configuration is : AMD-FX 8 cores @ 4.7Ghz 32 Gb RAM 500 Gb SSD (read/write 600Mb/s) Ubuntu ...
1
vote
1answer
1k views

Having trouble connecting QGIS with postgres database with postgis extension

I am working on Ubuntu Precise with postgresql version 9.3 and postgis 2.0. After initially starting my postgres database and eventually getting permission errors that would prevent postgres from ...
0
votes
0answers
12 views

pgRouting pgr_trsp returns no route

Installed a fresh PostgreSQL v9.4.1 x64 on Windows, and used the Application Stack Builder to install PostGIS 2.1 bundle which includes pgRouting 2.0. I created the sample data ...
0
votes
2answers
39 views

Count number of points within certain ranges from a set of points

I have the following, which gives me the number of customers within 10000 meters of any store location: SELECT COUNT(*) as customer_count FROM customer_table c WHERE EXISTS( SELECT 1 FROM ...
1
vote
0answers
26 views

Export only one value from a one-band raster

I have a PostGIS database with a georeferenced raster, with one band which contains values from 0 to 255. I should export it to a transparent GeoTiff picture in which the only visible pixels are those ...
-1
votes
1answer
18 views

How to import data into a table from another similar table?

I am working with PostgreSQL to import a table from a .shp file and my task is to populate another table (same attributes as this .shp table) with the data of the table of the .shp file table that i ...
2
votes
1answer
74 views

Find number of points within certain radius of a set of points

I have two tables. One is a list of stores (with lat/long). The other is a list of customer addresses (with lat/long). What I want is a query that will return the number of customers within a certain ...
2
votes
1answer
560 views

Installed PostGIS extension not listed for database

I have a PostgreSQL database with the PostGIS extension enabled. I know that this extension is enabled, since I am using PostGIS functions, and I can actually see the PostGIS functions. However, ...
2
votes
0answers
38 views

How do make ST_Split ready for QGIS?

In my recent QGIS project I need to split polygons (table/layer "pol") by both closed and non-closed linestrings (table/layer "lin"). I've tried the following SQL queries. CREATE VIEW split_pol AS ...
8
votes
3answers
6k views

Error when trying to run Create Extension postgis

I have installed PostgreSQL 9.x and PostGIS 1.5/2.0 several times and have never had this problem. I just got a new CentOS 6.3 server up and running and and I have Postgres 9.3 functioning as ...
1
vote
1answer
45 views

Can QGIS manage non-spatial PostgreSQL database?

I have a database with a table with plots. This table has spatial field for the area. Also, I have another table with owners. An owner can own some plots, and the there are a "id_owner" field in the ...
4
votes
2answers
590 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 ...
3
votes
1answer
146 views

How to edit a PostGIS database using ArcGIS for Desktop Add-In/Extension? (no ArcSDE)

I need to improve an existing solution to be able to do multiuser editing within a PostGIS database from ArcMap. Available for the solution is ArcGIS for Desktop 10.3 [Basic]. (No non-free Extensions ...
0
votes
0answers
13 views

Tilestache - Mismatch between the coordinates present in the PostgreSQL/PostGIS and those returned by PostGeoJSON provider

This is the relevant bit my Tilestache config, "points-of-interest": { "provider": { "class": "TileStache.Goodies.Providers.PostGeoJSON.Provider", "kwargs": { "dsn": ...
1
vote
1answer
225 views

Convert native box to geometry

I have an old table that contains bounding boxes of lat long coordinates in a "box" type. How do I convert them to PostGIS geometry ? I tried using ...
0
votes
1answer
35 views

SQL query giving error in pgrouting?

SQL error: ERROR: function point(numeric) does not exist LINE 4: (ST_GeometryFromText(Point(53.34972 -6.26025)), 4326), 1000) ^ HINT: No function matches the ...
1
vote
1answer
171 views

Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination?

I am developing an web GIS for map data presentation for public. Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination or similar? More Details: ...
0
votes
0answers
9 views

Get addresses from TIGER geocoder in polygon

I have the TIGER geocoder installed, setup and working in POSTGIS. I also see the reverse geocoder lets me get an address from a point on the map. But now I want to provide a polygon and get all the ...
0
votes
0answers
15 views

sql transformation from 29902(tm65) to 4326(wgs84)

ALTER TABLE Counties ALTER COLUMN geom TYPE geometry(Point,4326) USING ST_Transform(geom,4326); gives me the error: SQL error: ERROR: relation "counties" does not exist In statement: even ...