PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
0answers
23 views

How to split linestrings where start/end points don't touch nearby lines

I am trying to figure out some basic routing with PostgreSQL/pgRouting and I'm struggling a bit. Our network of linestrings are not topologically correct, tracks that should be connected don't touch, ...
1
vote
1answer
18 views

Is product purchaser in distribution area?

I am going to be using PostGIS 2 to create a lookup service. Given a point (lat/lon), I need to either find if a product can be distributed there, or b) a list of products or distributors. I am ...
0
votes
0answers
14 views

QGIS formatting problem using POSTGIS (datetime)

I want to use the time manager plugin using data from a PostreSQL-db. In there the time stamp is set up as follows: "[...]to_timestamp('2014-10-21 00:00:00', 'YYYY-MM-DD HH24:MI:SS')::timestamp ...
0
votes
0answers
13 views

GeoServer 2.6 + PostgreSQL 9.3.5, GeoServer becoming unresponsive

We're displaying point vector data on a web client using an OpenLayers (2.12) WMS layer... rendered via a GeoServer SQL View reading from data in PostgreSQL. The particular layer has a viewParam on ...
3
votes
2answers
40 views

How can I export data containing umlauts from PostGIS to shapefile, without losing the umlauts?

I am exporting my Finnish (Finland) data from PostGIS to esri shapefile. I am using the PostGIS Shapefile Import/Export Manager and I don't see any way to specify the encoding of the shapefile's ...
2
votes
1answer
60 views

PostGIS Nearest Neighbour outside buffer

I am trying to find the 6 nearest neighbours to a point which are outside a defined buffer. Basically I am comparing points of the same table and working with Mike Gleason's examples. WITH subq AS ...
1
vote
0answers
30 views

Create a “wide” table recording all overlaps between polygons in PostGIS

I have a set of overlapping polygons and would like to record which polygons are overlapping at each intersection. I have followed the instructions at: ...
5
votes
1answer
79 views

SQL “Case” statement when count(*) is 0

I am trying to write the following SQL command using case clause. with x as (select the_geom as geom from table1 where st_dwithin(the_geom, st_setsrid(st_makepoint(28.959495,41.019913), 4326), ...
1
vote
2answers
28 views

Insert values in Postgresql in Java

Hello i try to insert same values in my table but i write this code String sql = "INSERT INTO points (gid, osm_id, name, type, geom)VALUES (?, ?, ?, ?,ST_GeomFromText('POINT(?, ?)', 2100));"; ...
1
vote
1answer
41 views

Modifying “pg_hba.conf” file to listen local TCP/IP conection

I am starting with PostGIS and there is an error when trying to connect through a TCP/IP connection. What I have done is: installed PostGre 9.3 in my PC, then installed PostGIS 2.3 for postGre 9.3, ...
0
votes
1answer
27 views

How to modify imposm data mapping in order to include the user name?

I want to import OSM data into postgresql with imposm. How do I have to modify the import process in order to have the user name as an attribute in my tables? Do I have to change that in the data ...
1
vote
0answers
29 views

Generate random points in polygon. Algorithm question

i created a Random Point Generator in python using the algorithm described here by @whuber. The algorithm is implemented using Shapely, PostGIS and psycopg2. To boost performance pythons ...
1
vote
1answer
15 views

How do I ensure polygons are properly displayed when using 'on the fly' CRS transformations in QGIS 2.6?

QuantumGIS 2.6.0 (Windows 7 64-bit) I have created a PostgreSQL POLYGON as WGS84 (CRS 4326). The polygon is a series of points around (but not actually on) the edge of the map. This is a rectangle ...
-2
votes
0answers
14 views

Need some example of mapfish as framework

I need to create a webgis with ms4w as server and mapfish as framework/library, postgresql as the database. So Any of you can help me out to give some example to show map in browser using query. I use ...
2
votes
3answers
59 views

ST_MakePoint or ST_PointFromText to generate points

I'm new to postGIS and am having trouble finding an answer to this question. I have loaded UK postcode data (OSGB36, SRID 27700 with eastings and northings fields) into a postGIS database. I now want ...
2
votes
0answers
15 views

QGIS isn't displaying dates in the attribute table

I have a QGIS project that links to data in a Postgres database. For some reason, QGIS is not displaying any data in date fields. The date fields appear to be fine in Postgres and I have performed ...
0
votes
0answers
53 views

Converting GPS coordinates points to polylines

I happen to have some GPS coordinates points based on timestamp in a table. My table consists of and id , time_stamp and GPS points as the geometrical data. I want to create a line by joining all ...
-3
votes
1answer
40 views

How to use st_touches to get all nearby states

I have a table with all US states geometrical data: USstate ------- state | The_geom (here filling in random value) AL | 00012312 NM | 000234234 NJ | 0000234534 NY | 00005465 ...
-3
votes
1answer
44 views

How do you combine multiple spatial functions in one query?

I want to find out the intersection and difference in the same query using postgresql. How can I combine both st_intersect and st_Difference in same query and return the result.I want to compute the ...
1
vote
0answers
16 views

TileStache some vector tiles failing / postgis connection error

I have TileStache running fine with NGINX/uWSGI on my server. Problems start when I try to render data as vector tiles from a postgis datasource. A few tiles will normally work fine, but at some ...
0
votes
0answers
27 views

Capturing points slightly out at sea

I have two tables one containing points (points) and the other polygons (polygons). I want to generate a two-columns table identifying for each point of the first table the polygon containing it. So ...
1
vote
1answer
31 views

How to import geometry data from csv file to postgres?

I have geometry file in *.xls file, but when I save in *.csv it say "some feature in your workbook might be lost if you save it as CSV (Comma delimited)" however I keep that file anyway and when I ...
-2
votes
0answers
58 views

How to compute “how many points present in each square mile area”

I am using postgressql. I am searching psql command - to find out number of points that lie in every square mile of an area. the SRID is 2263.and I have some information: Extent West -74.257159 East ...
2
votes
0answers
42 views

Arcpy cannot connect to SDE on PostgreSQL with 32-bit version

So I've been banging my head against a wall for awhile with this one. I recently setup an SDE database in Postgres, and all seemed good. I am able to connect to it from both ArcMap and ArcCatalog, ...
3
votes
1answer
64 views

Postgis is Broken after installing Nominatim

I followed Nominatim Tutorial to install PostGIS and after that I can't access PostGIS at all I already trying reinstalling and installing everything over and over again with no success. Everytime I ...
2
votes
0answers
55 views

Inserting coordinates from Google Maps into a Database

My question is pretty basic. I am using Android Google Maps to take the coordinates off a location on the map and I want to insert it into a PostgreSQL database. I know I have to use PostGIS but how ...
1
vote
1answer
24 views

importing shapefiles to postGIS on QGIS1.8

I am trying to import a shapefile into postgis from within QGIS 1.8. The QGIS is based on a server that is not managed by myself. I have requested an upgrade to QGIS 2.0 ...but this may take ...
0
votes
1answer
72 views

Google Maps Api , PHP, Javascript and Postgresq-Postgis

I'm trying to make a web application, where I take the start/end city from a text box, geocode the city, use the coordinates to query my database in PHP, and return the features to be drawn in the ...
0
votes
1answer
48 views

st_startpoint(the_geom) returning empty values

When I upload a shapefile to PostgreSQL using the QGIS tool I can create the routing topology following this tutorial without any problem. But when I use the PostGis Shapefile Import/Export Manager ...
0
votes
0answers
52 views

Live serving tiles from Tilemill: Easiest way?

I have set up Tilemill on a Ubuntu server and I have imported OSMBright as a starting point. In general it seem to work good. I have imported the planet file (took a long time but now it is done and ...
5
votes
1answer
119 views

TileMill fails to load Europe data from PostGIS. What am I doing wrong?

The Problem: Using OSM-Bright in combination with an imported (osm2psql) Europe shapefile, tiles won't load unless I have 2-3 layers active (of the total of 29). I don't have this problem with an ...
5
votes
1answer
101 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 ...
0
votes
1answer
13 views

return state of point from postgis / mapnik pgsql db

I realize that I can confirm whether or not a point lies within a state like this: SELECT ST_Contains(poly,pt) As testr FROM ( SELECT ...
2
votes
1answer
52 views

Export PostGIS line to AutoCAD with graphical direction information

Some time ago I managed to export from PostgreSQL to AutoCAD DXF format a line (LINESTRING) using ogr2ogr program with a PostgreSQL Query, and it works (I can visualise it by the QuantumGIS). Now I ...
2
votes
2answers
28 views

PostGIS 2.0 and Self Intersecting Features

I have a polygon feature class created by open streetmap that is returning a self intersection error. Is there a way to filter out these feature? Can I just use a sql statement to find the error ...
1
vote
0answers
33 views

Error creating a spatial database. ERROR

I have been trying to get Postgis set up for a while now, I am stuck on one error and have not found a solutions yet. This is on Ubuntu 14.04.1. I am trying to run: CREATE EXTENSION postgis But am ...
1
vote
1answer
34 views

How to modify a PostGIS function?

I wish to modify a PostGIS function ST_PixelAsCentroids. What is the best way to go under-the-hood of PostgreSQL/PostGIS functions and modify and customize them as you wish? I'm not hitting the right ...
0
votes
0answers
25 views

Adding data to PostgreSQL geodatabase using ArcGIS for Desktop?

I installed and configured PostgreSQL perform the settings in this link http://resources.arcgis.com/es/help/main/10.2/index.html#/na/002p000000t4000000/ My problem is I cannot upload feature class ...
1
vote
1answer
58 views

No route calculated when using direction=true

I am using pgr_dijkstra to calculate routes on OSM data. When using this call: SELECT * FROM pgr_dijkstra('SELECT id, source, target, cost FROM referentie.ref_osm_edges ' ,768576 ...
0
votes
0answers
28 views

Insert several gtfs feeds into the same postgis/pgrouting database

I want to import sevaral gtfs feeds into my postgis/pgrouting database so that I can route over all my gtfs feeds. The problem is that the sources / destinations ids of my gtfs are likely to ...
0
votes
0answers
35 views

Apply raster contraints on single table with multiple files

I have a raster table (pre-created using CREATE TABLE) containing multiple individual raster files that I append piece by piece to a final table. The table itself is in its own tablespace 'gisdir' and ...
0
votes
2answers
157 views

Unable to connect to PostGIS databases after Mac OS X Yosemite upgrade

I upgraded to Mac OS 10.10 Yosemite and am unable to connect to PostGIS databases (PostgreSQL version 9.3 and PostGIS installed from KyngChaos). Typing psql my_database returns this message: psql: ...
1
vote
0answers
31 views

Are there naming rules for direct connections from ArcGIS to PostgreSQL?

I don't have problem direct connecting arcgis to postgresql if my database name contains only letters, but when the name contains dashes or underscore e.g:"gisdb-dev", I receive an error when setting ...
1
vote
2answers
59 views

PostGIS syntax (function()).*

Whilst reading the documentation about using the PostGIS function ST_PixelAsCentroids() I was confused somewhat by this (ST_PixelAsPoints(rast, 1)).* syntax and as a newbie to SQL I was wondering if ...
0
votes
1answer
15 views

Is it possible to label a postgis Query Layer in ArcMap?

I've created a PostGIS query layer and I can't label it. I'm trying to work out if I'm dealing with a bug that I can't workaround, a bug that I can workaround, or if it is operator error. After ...
5
votes
2answers
86 views

Need Help Converting Shapefile coordinates into lat/lon

I'm having a little trouble importing a shapefile into PostgreSQL. Using shp2pgsql, I'm able to import the non-geometry data just fine. However, the geometry data is coming in based on some ...
1
vote
1answer
68 views

What options are there for geolocation-aware SQL databses?

I need to implement an SQL database that can make queries using geo-location based logic. e.g. select rows within 500m of coordinate x, y What options are available to do this with sqlite, mySQL, ...
2
votes
1answer
35 views

View with sequence in QGIS 2.4

In postgres, I created a view with a sequence nextval() to have an unique id (called vid). I tried to vizualise this view in QGIS but it failed. It seems that nexval() causes some issue according to a ...
0
votes
0answers
40 views

PostgreSQL Visual Coordinates

Hello I am making a web map application. I use PostgreSQL, PHP, HTML and JavaScript and I extract the coordinates from the database with PHP and pass it to my JavaScript. Here is my code: ...
2
votes
1answer
36 views

Storing the GML application schema in postgres

I have to store the application schema for a GML file which is in Xsd format in PostgreSQL table. I want to use the ISO standards for that. From what I have searched I think ISO 19109 has to be ...