PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
2answers
112 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 ...
0
votes
1answer
77 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
90 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
2answers
71 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
40 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
1answer
288 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
27 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 ...
1
vote
1answer
31 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 ...
8
votes
2answers
2k views

ArcGIS 10.1 edit PostgreSQL layer

I've been working with QGIS/PostgreSQL/PostGIS for a while now, without problems. But now I have to change QGIS for ArcGIS 10.1. I'm having trouble adding a layer from PostgreSQL and being able to ...
2
votes
1answer
172 views

PostgreSQL default values in QGIS 2.8.1

I have a problem with default values the are set in a PostgreSQL table. When I work on them in QGIS 2.8.1 and I save the layer, the default values were not computed, so the constraints block me. With ...
-2
votes
1answer
37 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 | ...
0
votes
1answer
50 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 ...
1
vote
0answers
40 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
0answers
19 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 # ...
0
votes
0answers
14 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 ...
2
votes
2answers
689 views

How to perform a buffer analysis in PostGIS?

Need to Implement Spatial Analysis in Postgresql. Can Any one guide me to accomplish the spatial analysis eg) 2 km buffer for road network layer.
1
vote
0answers
14 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. ...
1
vote
0answers
88 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: ...
2
votes
0answers
32 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
0answers
13 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
58 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 ...
5
votes
3answers
3k views

How to find the nearest point from POI in PostGIS?

I have Point of Interest data in MySQL. This are the fields latitude,longitude,address,types in which I have stored the data. Now i want to import it into PostGIS Database. But does it required ...
1
vote
1answer
233 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
1answer
57 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
2answers
87 views

Post and Reconcile buttons in versionig toolbar grayed out in Arcmap

I have a versioned GDB (Postgresql) and I have versions DEFAULT-> A -> B. Version A modifies two poly lines and version B modifies one of the two that is modified in version A. In ArcMap, even though ...
0
votes
1answer
92 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 ...
4
votes
2answers
4k views

group by timestamp interval 10 minutes postgresql

I need some help on this: I need to group by a period of time spliting up by 10 minutes: I have this query below that returns me a result set SELECT timestamp FROM table_1, ...
1
vote
0answers
94 views

Do ArcGIS clients that direct-connect to postgresql/postgis databases override configuration settings?

I went in to modify some settings on a Postgresql database via the PGAdmin config editor and some of the settings don't have their default values and they are higher because they've been overridden ...
0
votes
2answers
53 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() ...
1
vote
1answer
25 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
0answers
18 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 ...
4
votes
1answer
83 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 ...
1
vote
1answer
110 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 ...
-3
votes
2answers
61 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 ...
1
vote
0answers
43 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) ...
0
votes
1answer
56 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 ...
-3
votes
1answer
63 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 ...
4
votes
2answers
212 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
1answer
47 views

How can you tell which port number an existing Database Connection is configured for?

I have a database connection to a postgresql database on a non-default port, 5433. I specify TESTDB,5433 as the instance and I can connect with no errors. If I open that connection properties ...
3
votes
0answers
54 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 ...
0
votes
0answers
71 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 ...
5
votes
1answer
264 views

Maritime route prediction avoiding land masses

I am working on a project where the following functions have to be implemented: Predicting the locations of the ships (in maritime environment) at a future time. (Can be done with Kalman filter, IMM ...
0
votes
1answer
161 views

How to store Google Maps DrawingManager Rectangle overlay in PostgreSQL Postgis GEOMETRY(GEOMETRY, 4326)

What is the correct way to store a Google Maps DrawingManager rectangle overlay? The API basically provides me with NE & SW lat/long coordinates. Should I use BOX()? Is it possible to create a ...
1
vote
1answer
86 views

How to define Z dimension on table with PostGIS for import in TileMill?

I'm trying to reproduce the idea behind this blogpost from Mapbox, but with other data, for example the ne_10m_populated_places_simple dataset from Natural Earth. By adding a z-dimension to the data ...
1
vote
1answer
48 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
80 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 ...
0
votes
0answers
52 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 ...
1
vote
0answers
73 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
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)', ...