PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
0answers
14 views

Defining 'os' in geonode custom installation?

Can any body teach me how to resolve this GeoNode problem? I tried following Geonode's documentation on installing it in development mode which was successful however when I tried changing its default ...
1
vote
1answer
35 views

How to concatenate values from postgis table which have the same id into a new column? [closed]

I have the following table in postgres-9.3 postgis 2.1. (geom values is too long , I cut to make it short in below table): id | name | geom ------------------------- 12 | A | "01030000000" 12 | ...
3
votes
1answer
54 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. ...
1
vote
1answer
44 views

Deleting values from PostgreSQL database in FME?

I have a PostgreSQL database which I initialized through FME. What I want to do now is to delete some values from the database. How can I do that? I am trying to use SQLExecutor but I don't know what ...
1
vote
1answer
258 views

Union of several linestring to multilinestring using MS SQL Server

Followed Postgreql query is the existing one used to combine serveral linestring to a single multilinestring. is there any equivalent of this in SQLServer . SELECT ST_AsText(ST_Collect( ARRAY[ ...
2
votes
1answer
230 views

Geoserver OSM data Imported via osm2pgsql - most efficient tables to use to style roads

The Osm2pgsql importer for OSM data to Postgres results in two tables for ways, one called planet_osm_roads and a second one called planet_osm_lines The Osm2pgsql documentation states that the ...
3
votes
2answers
87 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). ...
1
vote
1answer
236 views

How to calculate the track length of GPX files with PostGIS?

I am trying to calculate the length of a GPX track. The original GPS data looks like this: <?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <gpx ...
0
votes
2answers
152 views

Enlisting all OpenStreetMap (OSM) street names for General Transit Feed Specification (GTFS) routes?

I have exported OpenStreetMap (OSM) data of a city to my local postgresql db using osm2pgsql. I would like to add the General Transit Feed Specification (GTFS) routes information (say bus routes) ...
2
votes
1answer
39 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
1answer
82 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 ...
0
votes
0answers
39 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';" ...
0
votes
1answer
193 views

Importing recent NAVTEQ/HERE RDF Data into Postgres/Postgis

I am trying to import a recent version of navteq data into a postgres DBMS. I have downloaded the 2014Q2 version of the data from https://here.flexnetoperations.com as well as ...
0
votes
1answer
18 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 ...
2
votes
2answers
81 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 ...
3
votes
1answer
238 views

Get Multiple Shortest Path using PgRouting in One Query

I am trying to get multiple shortest path using A* Algorithm available in PgRouting. I referred Solution given by UnderDark ( Link of the Stakoverflow Post ) . But it is not giving me proper Output. ...
1
vote
2answers
215 views

Counting self intersections of linestring using PostGIS?

Is there a way of using PostgreSQL + PostGIS for finding the number of self intersections in a linestring? I have a linestring that goes forward but in circles, and I need to find the number of times ...
12
votes
4answers
5k views

Which is the best way of working with PostGIS data in R?

I work with R almost all the time, and now I am using it for doing spatial data mining, but I have this question: I have a PostGIS database with (obviously) GIS data, If I want to make statistical ...
0
votes
1answer
57 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
228 views

SQL-query should return GeoJSON FeatureCollection

I'm trying to return a GeoJSON FeatureCollection object from a SQL-query with PostgreSQL 9.3 and PostGIS 2.1. This is my query so far: SELECT row_to_json(fc) AS p FROM (SELECT 'FeatureCollection' ...
1
vote
1answer
69 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 ...
2
votes
1answer
571 views

Create isochrone from multiple start points

I want to create an isochrone. For this I could use the pgr_drivingDistance function with pgRouting (http://docs.pgrouting.org/dev/src/driving_distance/doc/index.html) but it only takes one start ...
1
vote
2answers
52 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 ...
4
votes
1answer
442 views

How can I make a Postgres/PostGIS ST_Distance_sphere query more efficient?

Within Postgres/PostGIS I have written an SQL query to get the closest distance for each element within a point coordinate table from a polyline table. The query comes back and works correctly, but ...
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
1answer
47 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
17 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
26 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
142 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 ...
0
votes
1answer
356 views

ERROR: Operation on two geometries with different SRIDs

I'm new when it comes to GIS and PostgreSQL. I have searched everywhere for the cause of this problem but I can't find the solution. I was following the documentation here First i created a table: ...
-2
votes
1answer
31 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
42 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
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
0answers
17 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
11 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 ...
1
vote
2answers
593 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
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. ...
1
vote
0answers
80 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
30 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
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
51 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
118 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
41 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 ...
1
vote
2answers
173 views

adding geometries to a source, target table for multiple rows in pgrouting

I am having an issue trying to perform the pgr_dijkstra algorithm and getting back a line in my table for multiple rows. I have a table that has a columns of source, target node id's but I cannot ...
0
votes
2answers
67 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
70 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
3k 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 ...