PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

1
vote
1answer
43 views

How do I project a point stored as Lat / Lon to a state system?

I have some points stored as WGS84 (EPSG:4326) data. I want to write a SELECT statement to return the projected values, in EPSG:2811, and unprojected values. Here is my table SQL: CREATE TABLE ...
0
votes
1answer
35 views

Problem with ST_Intersection in postgis

I have got a problem with ST_Intersection as bellow query. I do not know why I can not get element z of this intersection? ----query: SELECT ST_AsText(ST_Intersection('LINESTRING Z (0 0 0, 2 2 2)', ...
1
vote
1answer
55 views

Extracting specific geometry point from MultiPoint geometry using PostGIS?

I am working with multipoint geometries in postgis and would like to extract the geometry point associated with the greatest y value of the multipoint geometry. How may I accomplish such a task? For ...
0
votes
0answers
89 views

How to import osm.pbf file into database with Python Imposm

I want to import a .osm.pbf file with the Python library Imposm. Currently my work flow is the following: import requests import os city_name = 'santiago_chile.osm.pbf' url = ...
0
votes
0answers
47 views

Make PostGIS points from Ajax data in a php file

I have an AJAX a string which has lat-long parameters in a request. I try to make point in an SQL query but I get this error 37.15452626 ERROR; parse error- invalid geometry HINT: ...
1
vote
0answers
75 views

PostGIS: Ordering by the sum of two distances

I have an SQL statement that selects possible bus routes between two points, ordered by the walking distance required from the start point to the departure bus stop (distance1) and the arrival bus ...
1
vote
0answers
50 views

PostGis without shp2pgsql

I recently reinstalled postgis on my pc, following these instructions link. The installation is successful, and for several days work using PostgreSQL and PostGIS without problems. Now, I need to ...
1
vote
0answers
32 views

ST_Split and looping problems PostGIS

I am a total PostGIS noob, and am having trouble understanding the finer points of SQL syntax. I am trying to take a large set of line data and clip it with a polygon. I then want to create a new ...
3
votes
1answer
6k views

Transforming from SRID 900913 to 4326 with PostGis

I have two Postgres tables with different SRIDs: 4326 and 900913. I want to convert the latter to 4326. I first changed the SRID using: Select UpdateGeometrySRID('table', 'geomcolumn', 4326). I ...
1
vote
2answers
76 views

How to populate a table with geom line? [closed]

I have the coordinates of a lot of points in a table. In pgadmin I want to make a line that passes on these points. I already have my Coordinate point im my table. I want to make line with those ...
1
vote
0answers
28 views

pgRouting. pgr_ksp() returns -1 as id3

The documentation (http://docs.pgrouting.org/dev/src/ksp/doc/index.html) says that the result should be 0 for the last row. Is the same 0 than -1? I'm new on this. Thaks for the help.
0
votes
0answers
21 views

Update Statement in PostGIS ERROR

I am trying to update a column in PostGIS using information from a column in another table where they spatially intersect. I looked up how to do this on the PostgreSQL tutorial and I think that I ...
0
votes
0answers
33 views

Displaying measurements on a grid of the Earth

I'm developing an application where I need to draw the averaged results of some measurements on a map. Right now, I'm using Leaflet to draw the map with MapQuest/OpenStreetMap tiles, and have the ...
7
votes
4answers
4k views

Connecting to ArcGIS Desktop PostgreSQL database (running locally)

I know this is a total noob question but then again, when it comes to PostgreSQL I am a total noob... I have installed the OpenGeo suite on my computer, running Windows 7, 64-bit. I have ...
1
vote
1answer
92 views

Creating GeoJSON from Postgres

We are transitioning from Google Maps to Mapbox. Mapbox is a proponent of geoJSON and uses it extensively, so we are considering adopting it for all of our maps. An issue is the creation of the ...
3
votes
1answer
110 views

PostGIS - ST_Within or ST_Disjoint performance issues

I have a table of about 150,000 points in PostGIS with a spatial index and a SRID of 27700 (OS). I want to select the points that fall outside England and Wales. I have a multipolygon table with ...
-2
votes
2answers
146 views

How to populate my table with data in excel format?

I have 160000 rows of data in Excel and I want to put them in my table in PostgreSQL. How can I import X,Y coordinates from my excel file to my table in postgresql?
0
votes
2answers
116 views

Postgresql trigger on a table that update a field

Depending on values on 2 fields A and B, I would like a field C to be updated or filled with a specific value. For example : create or replace function periode() returns trigger as $BODY$ begin IF A ...
0
votes
1answer
47 views

Use C# to display PostGIS data in ArcGIS Developer kit with arcgis-ogr plugin

I am trying to display data in ArcGIS Runtime Engine Developer kit 10.2.2 using OGRPlugin/OGRPlugin/ develop by Ragi Yaser Burhum on https://github.com/RBURHUM/arcgis-ogr . I am using this format but ...
14
votes
2answers
3k views

Which function for creating a POINT in PostGIS?

When defining a Point in PostGIS, when do you decide to use which of the following? ST_SetSRID(ST_MakePoint(lon,lat),4326) ST_SetSRID(ST_Point(long,lat),4326) ST_SetSRID(ST_GeomFromText('POINT(lon ...
0
votes
0answers
49 views

How to get elevation of a coordinate given a dtm file out of a PostGIS?

What would be the best way to get elevation of a coordinate out of a PostGIS database (SQL/plpgsql) given a GeoTIFF dtm file? Importing as PostGIS Raster (which seems more costly) and calling ...
1
vote
0answers
49 views

Trying to install PyGreSQL, receiving DLL load failed error

I am trying to install the PyGreSQL package into Python 2.7. I am running 32-bit Python on a 64-bit Windows 7 machine. The installer I am using is the file PyGreSQL-4.1.1.win32-py2.7.exe from here. ...
0
votes
0answers
20 views

php script with lat and long for postgresql

I would like to create a postgresql geodatabase able to display, with OL3, data entered through a php script. In the php script i indicated the two fields latitude and longitude data as numeric ...
0
votes
0answers
29 views

Use another schema than public in geoserver monitoring plugin

We want to use the Geoserver Monitoring Plugin, based on a PostgreSQL 9.3 database. It works fine except that the plugin create the tables request and request_resources in the public schema, while we ...
0
votes
1answer
76 views

how to fix this ERROR: Start vertex was not found

I am attempting to make an SQL selection but receive an error. My statement: SELECT * FROM network JOIN (SELECT * FROM shortest_path(' SELECT gid AS id, start_id::int4 AS source, end_id::int4 ...
1
vote
1answer
58 views

slow Openlayers with 270000 points

I have 270 000 points on a map. If you zoom out, the site hangs for a very long time and sometime the page just crash. I use Cartaro with Drupal. https://www.drupal.org/project/cartaro Cartaro is a ...
3
votes
3answers
4k views

Install the Pgadmin3 shapefile importer plugin on a Mac(10.8)?

I'm new to GIS related things and I'm setting up a Postgre/Postgis database for geospatial queries. I'd like to import various shapefiles into the database and I found that Pgadmin3 has a shapefile ...
0
votes
0answers
25 views

Query processing time for network table creation using pgRouting 1.05

I am trying to follow these steps for creation of a network table using pgRouting 1.05. In my case I have two road geometry tables, one is bangalore_road and the other is all_india_roads. Obviously ...
0
votes
1answer
26 views

problem in PostGIS Name of the system used for Points and how to get distance between to point?

I have started to work on a project in PostGIS. I have a table with a geometry points in which points saved like this : "010100000089F511C671C01E4162327E2A83545341" and I have translated this ...
0
votes
2answers
91 views

Neighbors within distance from every row

I have a research project of 180,000 entries and I need to calculate the number of neighbors (points from the same table) that exist within a 300 meter radius for each point. My method is very slow, ...
1
vote
1answer
414 views

How to improve ArcGIS Desktop 10.2.2 and Postgres 9.2 PostGIS geometry performance?

I'm experiencing sever performance issues on a polygon featureclass(PG_GEOMETRY) in a PostgreSQL 9.2 database from a 10.2.2 client. Even when zoomed to an area with 10-20 features within the extent. ...
0
votes
0answers
11 views

PSQL: Setting maxspeed to all highway tags having 'highway' text= NULL AND 'maxspeed' text = NULL?

Hello everyone, I am trying to create a procedure in postgresql using functions of postgis extensions where I can first search and find all the rows having an empty 'highway' tags AND ...
0
votes
1answer
59 views

OpenLayers WFS-T tinyows insert transaction: error GID value

I try to implement insertion of new point using Openlayers v2.13 saveStrategy calling tinyows which implements the WFS-T transaction; I use the example from ...
1
vote
0answers
17 views

Free tutorials for beginners in PostgreSQL, PostGIS and SQL? [duplicate]

I've been cruising youtube videos and various sites trying to pick up information on working with postgresql, postgis, and sql. I would love a few recommendations for quality tutorials and sites. ...
2
votes
1answer
113 views

Convert 2D coordinates from NAD83 to WGS84 using Postgis

I have a set of NAD83 coordinates that I need to convert to WGS84 coordinates. I am using postgis on an RDS. Specs for the box I am using from postgis_full_version(): POSTGIS="2.1.3 r12547" ...
0
votes
0answers
200 views

PostGIS extension on Debian not found: could not open extension control file

I'm trying to set up the PostGIS extensions on a Postgres 9.1 database on Debian Wheezy, but getting an error: =# create extension postgis; ERROR: could not open extension control file ...
1
vote
2answers
255 views

Determine which points are contained inside a given polygon

I have these database tables defined: CREATE TABLE regions ( id SERIAL PRIMARY KEY, name VARCHAR(150) NOT NULL ) CREATE TABLE region_points ( id SERIAL PRIMARY KEY, region_id SERIAL ...
1
vote
2answers
432 views

osm2pgsql error when import pbf for Nominatim DB

Good day to all, Am getting the following error when running utils/setup.php in nominatim 2.1: Reading in file: /storage/Library/geodata/africa-latest.osm.pbf Processing: Node(54854k 62.1k/s) ...
0
votes
1answer
38 views

UPDATE a value field for area of the geom and convert sq m to acres using cartodb

I'm trying to use the SQL commands in CartoDB to UPDATE a value field that shows total acres of the area of the_geom. My SQL is pretty poor/entry level and has some issues: UPDATE table_name SET ...
0
votes
0answers
59 views

Create table into PostgreSql from Geoserver SQL View query

I know how to connect Geoserver to PostgreSql and create SQL View queries with parameters from Geoserver, but ;it is possible to create a new table into PostgreSql from a Geoserver Sql View with ...
1
vote
1answer
63 views

Is there any topology handler in QGIS?

When importing autocad maps, sometimes topology will be chaos, this need to be amended. And when I add new topology in QGIS, how to save that to the postgreSQL? Is these functions included in QGIS or ...
1
vote
1answer
72 views

Importing shapefile into PostgreSQL/PostGIS?

enter image description hereI'm completely new to PostgreSQL and PostGIS. I finally got both installed and have the PostGIS extension installed. I'm running the PostGIS shapefile import manager. I ...
1
vote
1answer
47 views
2
votes
1answer
54 views

How to reproject all geometries columns in a PostGIS schema

Is there's a way to reproject all geometries columns of a postgis schema given the same source SRID to the same destination SRID? Exemple : schema.table1 has 2 geometries columns geom and geom2 with ...
2
votes
1answer
96 views

Database connection times - PostGreSQL vs Oracle (ArcSDE)

I have 2 SDE instances. Both have the same amount of data (2000 datasets both raster and vector). One is PostGreSQL 9.2 with ArcSDE 10.2.1 One is Oracle 11g with ArcSDE 10.2.1 So basically the ...
0
votes
0answers
63 views

Postgis C/C++ API unpacking geometries

I would like to create a postgres extension that works with postgist types Polygon, Multipolyon, Linestring, Multilinestring based on postgres extension building infrastructure: ...
0
votes
1answer
29 views

Migrating Data to Another Database whit FDOToolbox

I want to migrate my data (Shapefile) to a PostgresSQL using a FDOtoolbox , i searched a tutorial for that but i dont found it . can any one explain the steps to do for migarte the data from a ...
1
vote
1answer
85 views

Get a point value with psycopg2 and PPyGIS

I'm trying to setup a basic working postgis setup with python ppygis package. >>> import psycopg2 >>> import ppygis >>> connection = psycopg2.connect(database='spre', ...
1
vote
1answer
547 views

Why does reading shapefile from PostgreSQL database give Error reading OID from table …?

I'm using arcgis 10.1 and i have a connection to a PostgreSQL 9.3 database. When i try to load a shapefile using the add query layer I get an error when opening the attribute table. The error says ...
0
votes
0answers
24 views

Assinging ID numbers with a spatial query in PostGIS

I am fairly new to PostGIS and I am working on a project where I am trying to write SQL to assign ID numbers in a column to points relative to the ID numbers of the polygons that contain different ...