PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
1answer
40 views

Can't import shapefile to PostGIS

Sorry if my question is double post with the previous. I have tried to browse but I think I still can't find the solution. I am using postgresql 9.4.1 and postgis 2.1(pg 94) and also qgis 2.4.0. All ...
1
vote
1answer
52 views

How to create dissolved buffers in QGIS with PostgreSQL/PostGIS?

Creating a dynamic buffer in QGIS I use the following query: CREATE VIEW buffer40units AS SELECT gid, st_buffer(geom,40)::geometry(polygon, 31492) AS geom FROM point; Now I want to dissolve ...
1
vote
1answer
33 views

assigning random points to unique values

I have generated random points in qgis and would like to assign the value of their geometry to a unique column in another table. I would like to do this in qgis or postgres or spatialite. Table A ...
1
vote
2answers
33 views

How to transfer large amount of OSM data to postgis using osm2pgsql?

I am new to using Openstreetmap data and PostGIS database. I learned how to use osm2pgsql and transferred osm data for a small city to PostGIS database and worked fine. The problem is that when I try ...
1
vote
1answer
19 views

How do I resolve “relation does not exist”

I have a view, named PointsForGpxExport, that contains points I want to export to a GPX file. The ogr2ogr command I'm trying to use for the export is included below. When I run the command, a GPX file ...
0
votes
0answers
8 views

Unable to create a model from a preexisting spatial database in Postgresql, .NET provider for postgresql doesn't exist

I'm having this problem that's blocking me for over 4 days now. I'm developing a WCF webservice and tried connecting to my Postgresql spatial database (created in ArcCatalog) via Visual Studio 2010. I ...
0
votes
0answers
18 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
45 views

Can't connect to foreign SQL Server table from PosgreSQL using OGR_FDW

I'm using Windows 7, with PostgreSQL 9.3.6 installed and PostGIS 2.1.5. While I wish I could get everything into PostgreSQL, I can't and need to connect to another server running SQL Server. I need to ...
-2
votes
1answer
28 views

How can I select only the points in a mixed geometry column in postgis postgres

Table "public.eating_drinking" Column | Type | Modifiers --------+-------------------------+----------- osm_id | bigint | way | ...
1
vote
0answers
33 views

Calculate total line lengths within a polygon?

I have basically the same conundrum as How do i calculate line segment lengths within a polygon? but I'm working in PostGIS, not ArcGIS. Any pointers? This query seems to like it should work, just ...
0
votes
1answer
35 views

How do I calculate ST_Length in miles?

I am playing around with a map of bike lanes (so, lines) and trying to calculate the total number of miles of lane in each of a couple of regions. But I'm not even sure how to use ST_Length to ...
0
votes
0answers
7 views

Pivot/Cross-tab from MS Access to PostgreSQL

I have read a lot about crosstab and so on and how to create them in PostegrSQL, but I can't really figure it out how to adapt this (from MS Access): TRANSFORM Sum(L007_tot_Lega.Ton2013) AS ...
0
votes
0answers
12 views

map doesnt shown up in css page

I use postgreSQL 9.2, postgis 2.0 and 2.1, pgrouting 2.0, and I connect it with css page (localhost) but the map from pstgreSQL database doesnt shown up, can anybody help me? MAP NAME PADANG # ...
1
vote
0answers
13 views

Help with sub-queries postgres

I wish to ask for some advice when it comes to build nested spatial expressions in postgres. I end up with the same kind of problem many times when it comes to select more than one type of geometry. ...
2
votes
0answers
28 views

How to create raster from table containing cell values in PostGIS?

I am having a table with integer values. These values are in between 0 and 2. I want to create a raster out of that table with integers as cell values. Or else how to create polygons out of that table ...
1
vote
1answer
22 views

QGIS Add PostGIS layer: restricting to single schema?

My primary PostGIS database has 12 schemas (schemae? TNIRN...), some of which have nasty-sized tables. The DB is on localhost, on my own machine. For the most part, the actual working tables are in ...
1
vote
0answers
9 views

osmosis 'unable to execute statement' error

I'm trying to use osmosis to import data to PostgreSQL, got an error: and, I executed the following command successfully:
1
vote
0answers
52 views

How can I speed up a slow ArcGIS Server 10.2 - PostgreSQL (9.2) ST_Intersects query?

I am troubleshooting a slow st_geometry query in Postgres 9.2 that uses ST_Intersects--a basic Select from table where ST_Intersects type query. table_extent ...
-1
votes
0answers
28 views

Street centers based upon way-segments?

I've recently imported an osm-file into postgresql for the purpose of geocoding. using the planet_osm_line table I could extract the street names of a particular city. However the lines table contains ...
1
vote
1answer
43 views

Postgis ST_Distance query returning inaccurate results

I am using the following query to retrieve records from a postgresql DB @services = Service.select("*, ST_Distance(services.lon_lat, ST_GeomFromText('POINT (lat lon)', 4326)) as ...
1
vote
0answers
51 views

GeoDjango: AttributeError: function 'GDALAllRegister' not found [closed]

Im trying to get started with GeoDjango. I am using this https://docs.djangoproject.com/en/1.8/ref/contrib/gis/tutorial/ tutorial. When I run "python manage.py migrate" This error occur: ...
1
vote
1answer
79 views

Store a GeoJSON FeatureCollection to postgres with postgis

I am new to GeoJSON. I have a GeoJSON features collection as shown and would like to store it in postgres table (testtable). My postgres table has a serial id and geometry column. { "type": ...
0
votes
2answers
36 views

Problem with a PostGIS trigger

I'm trying to update a lat and lon columns each time I insert a point with a trigger, but I don't know why I get an error. This is the syntax I'm writing: CREATE OR REPLACE FUNCTION update_tg2() ...
0
votes
1answer
50 views

pgrouting pgr_dijkstra forcing route along a selected edge?

I have routing working where a user clicks 2 points on the map, I find the closest vertex to those 2 clicked locations and pass that to a pgr_dijkstra function. What I would like is give the edge a ...
1
vote
0answers
12 views

Geoserver - How to make a psql-backed timestamp that uses timezones

I'm working on an application that extends geoserver and am frustrated as I'm trying to define a SimpleFeature that has timestamps that include timezones. I've tried declaring my timestamp field ...
1
vote
1answer
22 views

geometry_column table not automatically exist

I use PostgreSQL 9.2 but geometry_column table not automatically exist like spatial_ref_sys table, but if I use PostgreSQL 9.1 it's exist. How to make geometry_column automatically exist in PostgreSQL ...
1
vote
1answer
85 views

Why doesn't my spatial index work?

I have a table with 50 million test points. The points are stored as latitude / longitude with SRID = 4326. The create script for the table: CREATE TABLE points ( name character varying, point ...
1
vote
0answers
23 views

PostGIS is not seeing any GDAL drivers

I've tried setting POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL as an environment variable. As well as running SET postgis.gdal_enabled_drivers = 'ENABLE_ALL'; from psql. (With a pg_ctl restart after each) ...
4
votes
1answer
65 views

PostGIS: Strategy for fastest select by BBox with an ORDER BY polygon area clause. Cluster?

Update 2 (below) suggests 14% of the table geometries are stored out-of-line with the rest of the table records. This may be a useful clue. The Problem: We've got a table with appx 170,000 WGS84 ...
0
votes
1answer
42 views

find all circles intersecting another in a table [duplicate]

I am using postGreSQL (9.3) and postGIS (2.1). I have a table containing names and circles (point + radius). Given a name and a circle (point + radius), I would like to find all the database lines ...
4
votes
2answers
151 views

PostGIS: ST_Equals false when ST_Intersection=100% of geometry?

I have 2 datasets consisting of cadastral parcel data - roughly 125,000 rows each. The geometry column is WKB polygons representing parcel boundaries; all data are geometrically valid (the polygons ...
2
votes
0answers
32 views

Is it possible to replicate an SDE geodatabase including the archive tables?

I have a database in one location which I would like to replicate to another using one-way replication. In testing we haven't been able to replicate the archive tables, which is unfortunate because we ...
-3
votes
2answers
53 views

Fractional Area Calculation

I have a file (in both raster and vector) of different districts in a country. I have also made a grid of 1 deg * 1 deg (both vector and raster) of the country. I want to calculate the area of each ...
0
votes
0answers
51 views

Create a route by using points (pgRouting)

I'm currently working on a routing model for 17th and 18th century voyages. These routes are based on data from old shipping logbooks. I made a separate layer in QGIS which contains point. I exported ...
0
votes
0answers
50 views

Installing mysql_fdw on Windows

I want to create a join between a spatial database (PostGIS) and a non spatial database from MySQL. Both databases have a unique ID who can be joined. I found a way to do this with PostgreSQL and a ...
1
vote
1answer
24 views

st_length column in Postgres db and ArcGIS under WGS84

I have a polyline feature class in ArcGIS running on top of postgres in WGS84 datum. I am wondering what is the unit of length used to drive st_length column under this datum and what is the method of ...
0
votes
0answers
29 views

How do you unregister a table from a esri geodatabase?

How do you reverse the "Register with Geodatabase" operation? I reckon it isn't uncommon to accidentally register (since it is the first option on Manage menu in ArcCatalog 10.2). Is there a tool ...
2
votes
1answer
55 views

ERROR 999999: Error executing function - Failed to execute (CopyRaster)

ERROR 999999: Error executing function Unexpected operation No spatial reference exists This is a fragment from my log report: ERROR 999999: Error executing function. Database user ...
1
vote
0answers
33 views

Plotting points on a map, the json objects retrieved from a database; using WebGL shader code

I am using an OSM dataset using which I am plotting those points on a map (google maps API). I am plotting these points using webgl shader code (see:  http://psousa.net/demos/webgl/) The above link ...
1
vote
1answer
33 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
23 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)', ...
3
votes
1answer
105 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 ...
1
vote
1answer
27 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
39 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 = ...
1
vote
0answers
70 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 ...
0
votes
0answers
38 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: ...
0
votes
1answer
33 views

Fast way to check if postgis bounding box contains any points/linestrings

I have a bounding box given and want to know if this bounding box contains (or better intersects) any points or linestrings. So the query should return true if the first point/linestring was found and ...
0
votes
0answers
30 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
26 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 ...
1
vote
0answers
22 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.