PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
0answers
7 views

Transfer PostgreSQL data to New Laptop? [on hold]

I am completely new to PostgreSQL My data is in the directory c:\postgres.......data and the database name is GXPGRAN. I need to copy this to a new laptop. Can somebody please give me all the steps ...
3
votes
2answers
50 views

Creating polygons from line segments using PostgreSQL and PostGIS

Is there a PostGIS function that creates polygons from multiple line segments? I want to convert the pictured thirteen lines to four polygons. All lines belong to the table "boundary" (gid, geom). ...
0
votes
0answers
32 views

Perfom SQL queries in Python and process the result

I query column names from a PostGIS table with following Python code: colnames = [] sql_getcolumns = "select column_name from information_schema.columns where table_name='shp2py';" ...
2
votes
1answer
35 views

How to know if two geometric figures are approximately equal?

I would like to know how to determine if two geometric figures (the_geom) are approximately equals. By the way, I'm working with Python, PostgreSQL and Postgis I have the following geometries: ...
1
vote
0answers
19 views

ogr2ogr postgres import: check if dataset exists

I have a PostGIS database which I update daily with ogr2ogr using CSV files. This works great. Is there a way to check whether the actual value of a column already exists in the table (e.g. ...
0
votes
1answer
11 views

Connect MATLAB to cartoDB using Database Explorer?

I set up a database on cartoDB. I'm trying to use MATLAB to connect to the database using Database Explorer. I've downloaded the PostgreSQL driver. MATLAB asks for connection Parameters: Server ...
1
vote
2answers
36 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
49 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
61 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
34 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
39 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
26 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
14 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
20 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
2answers
67 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
36 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
8 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
13 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
29 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
1answer
68 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
30 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
44 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
65 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
83 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
37 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
55 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
87 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
26 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
69 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
35 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
53 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
53 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
25 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
30 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
58 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
36 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
35 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
24 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
113 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
29 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 ...