PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

1
vote
1answer
17 views

Does ST_Intersection work in 3D?

I am using "ST_Intersection" between two 3D lines which I believe do not intersect, but the result gives me their intersection. SELECT ST_ASText(ST_Intersection( ST_GeomFromText('LINESTRING( ...
2
votes
0answers
9 views

Can GeoServer Mosaic extension footprints be something other than a shapefile?

According to the GeoServer documentation for the Image Mosaic extension... http://docs.geoserver.org/2.4.x/en/user/tutorials/imagemosaic_footprint/imagemosaic_footprint.html It asks for a shapefile ...
1
vote
1answer
19 views

Postgres: plpgsql combine ST_Overlaps and ST_Intersects

I have a question regarding creating a trigger function in postgres with 2 conditions: when creating a linestring in QGIS their must either overlap nor intersect. So i wrote 2 function, each working ...
1
vote
1answer
160 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[ ...
1
vote
1answer
787 views

Having trouble connecting QGIS with postgres database with postgis extension

I am working on Ubuntu Precise with postgresql version 9.3 and postgis 2.0. After initially starting my postgres database and eventually getting permission errors that would prevent postgres from ...
1
vote
1answer
50 views

PostGIS ST within does not exist

I'm quite new to postgresql and postgis so this error will probably due to some rookie mistake. I want to run the spatial query ST_within. When I describe the query like this SELECT nw.entity_id AS ...
0
votes
0answers
8 views

Issues installing GDAL with PostgreSQL

I'm trying to install gdal-1.11.0 on CentOS 6 machine. Following the instructions, this is my config ./configure --prefix /usr/local --with-fgdb=/usr/local/FileGDB_API ...
1
vote
0answers
27 views

Find headwater polygons

This is a follow up question to this question. I have a river network (multiline) and some drainage polygons (see picture below). My goal is to select only the headwater polygons (green). With ...
5
votes
2answers
341 views

Find start of river

Edit: Follow-up question here (= Find headwater polygons). How can I determine the start of a river in PostGIS? I have a river network (Multiline) and want to find the startpoints of the rivers. ...
0
votes
0answers
25 views

How to create unique plane with PostGIS?

How to create a unique plane, with (x , y ,z) as center and a vector as normal, in PostGIS? I already saw "Make3DBox" function, but it does not make a unique one.
2
votes
1answer
34 views

Geohash36 for PostGIS

i was wondering if anyone created a ST_GeoHash36 function inside postGIS, i know the ST_GeoHash + ST_GeomFromGeoHash functions exists, But i need the geohash36 function inside postGIS, i need a ...
0
votes
0answers
9 views

How to choose entrys in pgr_kdijkstrapath over checkbox in HTML?

I want to create a GIS, where people live at pre-defined places(all of them play a defined musical instrument). A route should be created from these people to the place where they play together. It ...
0
votes
2answers
30 views

Can you do aggregate functions among nearby geometry in PostGIS?

I want to do aggregation based not on group but on geometry, is that possible in PostGIS? For example to calculate max, min, average price for all listings that's nearby a geometry point, how can I ...
3
votes
1answer
51 views

PostGIS multiple conditional statement on spatial join

I want to make a multiple conditioned spatial query in PostGIS 2.0/PostgreSQL 9.3., OS Windows 7. There are 2 tables, cadastre (Polygon) and roads (Linestring). Query: Select the sum (one number) of ...
0
votes
0answers
9 views

How to upgrade an PostgreSQL 8.3(32-bit)/ArcSDE 10.0 database to PostgreSQL 9.2(64-bit)/ArcGIS 10.2?

I need to upgrade a large production PG8.3(32-bit)/Arc10.0 database with a fair amount of programming (that has circular references) as-is. This is a system that I inherited, so I don't have the ...
2
votes
1answer
24 views

Visualising a raster PostgreSQL table in QGIS

I have imported a raster tif image into PostgreSQL with this command: raster2pgsql -s 32643 -I -M filepath.tif -F -t 100x100 public.databassename > filepath.sql And imported the output SQL file ...
3
votes
0answers
60 views

Spatial query too slow to handle bigger OSM extracts

I'm trying to compute some statistics for OSM data using PostgreSQL 9.3.5 and PostGIS 2.1.4. I started with a small bavaria extract which I downloaded from Geofabrik. The db schema is the normal API ...
2
votes
0answers
30 views

How to load GeoJSON into PostgreSQL database using Python?

What I have tried to do is (In Python IDLE): import psycopg2 import json try: conn = psycopg2.connect("dbname='carto' user='postgres' host= localhost password='password'") except: print "I am ...
4
votes
3answers
64 views

How can I export data containing umlauts from PostGIS to shapefile, without losing the umlauts?

I am exporting my Finnish (Finland) data from PostGIS to esri shapefile. I am using the PostGIS Shapefile Import/Export Manager and I don't see any way to specify the encoding of the shapefile's ...
1
vote
1answer
140 views

Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination?

I am developing an web GIS for map data presentation for public. Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination or similar? More Details: ...
6
votes
2answers
263 views

Where can I find PostGIS error codes?

Using ST_Contains in where clause sometimes gives me error messages like ERROR: GEOSContains: TopologyException: side location conflict at 37.3706 55.7882 For now I can't guarantee validity for ...
0
votes
0answers
101 views

Polygon dynamic grid creation for a shape file

I have used QGIS Vector->ResearchTools-> Vector Grid to create a 1lat x 1 long grid for the landpolygon shape file (from osm). Now, I am interested in creating dynamic grid for the original ...
1
vote
1answer
190 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 ...
0
votes
1answer
33 views

How do I change the PostgreSQL data directory in the OpenGeo Suite 4.5?

I am using OpenGeo Suite and I would like to move the PostgreSQL databases files to a different drive than my operating system. The default location installed by OpenGeo Suite is in the ...
8
votes
1answer
550 views

How to view a 155 MB raster stored in PostGIS?

I am using the following command to load a raster into a postgres database: raster2pgsql -I -C -e -Y -F -s 3086 -I -C -M myraster.tif myraster -F -t 30x30 | psql -U postgres -d database -h localhost ...
2
votes
4answers
74 views

Postgis don't use spacial-index with st_intersects

I imported the data from openstreetmap using osm2pgsql and copied it another table structure. If I made a query for containing rows using st_intersects, st_contain or someone else, postgis don't use ...
0
votes
1answer
123 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 ...
1
vote
1answer
43 views

QGIS 2.6 how to prevent user to drop a postgis table

Does anyone know how to prevent user to drop a postgis table? I have a vector layer imported from a postgis2.0 database, and one of my users drop it accidently. Fortunate I had a backup, but i don't ...
1
vote
0answers
81 views

Using ArcMap 10.3 with PostgreSQL 9.3.x database and PostGIS 2.1.1?

I have a PostGIS database that we use for data storage. I would like to open this data in ArcMap instead of storing it in another format. In previous versions of ArcMap it has been possible to open ...
2
votes
1answer
477 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
1answer
19 views

Select Polygon Intersections Between Two Tables With No Common Key

I am new to geodatabase queries and cartodb. I am trying to write a SELECT query that will do the following. I have two tables. Table 1 contains congressional district polygons and info about ...
-1
votes
0answers
21 views

In need of PostgreSQL tutorial [closed]

Is it me or it's quite hard to find some tutorials to learn PostgreSQL. To me, it's really hard to find anything that has a sample database with it.
0
votes
2answers
111 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) ...
-4
votes
1answer
21 views

Make connection from Postgresql to QGIS? [closed]

I'm still new in QGIS. I want to add data from one layer to another layer in QGIS. How could I accomplish that?
1
vote
1answer
16 views

SELECT geometry FROM spaces WHERE geometry ARE WITHIN OR OVERLAP polygons FROM OTHER table

I've got two tables, one containing LINESTRINGs and one containing POLYGONEs. I would like to select all the LINESTRINGs that are containing within the outer boundary of all the POLYGONs combined. ...
5
votes
3answers
150 views

PostGis: Geometry from UTM text

I have plain data in a postgresql table which looks like this: ╔════╦═══════╦═════════════╦══════════════╦══════════╦═════════════════╗ ║ id ║ index ║ easting ║ northing ║ utm_zone ║ ...
4
votes
3answers
2k views

ArcGIS Server not showing map service? [closed]

I have a map service enabled in my server and have kml and wms as well as mapping and feature access capabilities turned on. I can view the wms in qgis, I can veiw the kml in google earth. However ...
-2
votes
0answers
16 views

change database from SqlServer to Postgresql [closed]

I work with GIS Server and Microsoft Sql Server database,Now I need to change my database to Postgresql.I do not know how I can do it.
2
votes
0answers
264 views

Unable to edit PostgreSQL/PostGIS layers in ArcMap 10.2.2

I am connected to the database, have added a layer, started edit session, but I am unable to edit the attributeeo table of said layer. ArcMap tells me that it is not an editable layer. When ...
3
votes
1answer
202 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
1answer
195 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
1answer
32 views

Get postal codes of a city in OSM via postgis/postgresql

So, I'm trying to get the postal codes of a city (polygon). Unfortunately, I never get consistent results with my code: SELECT a.name, b.tags->'postal_code' FROM planet_osm_polygon a JOIN ...
0
votes
0answers
21 views

Find closest points in routing network for a set of points to pick shortest route

I have the following WITH SQL Query which does select a set of filling stations along a route within the distance of 1000m. In the SQL statement I fetch 1 Point from the station and search the closest ...
6
votes
1answer
118 views

What controls the direction of TopoGeometry Linestrings?

In PostGIS, what if anything controls the direction that topogeometry LINESTRINGs will have when converted to geometry? It doesn't appear to be the order in which the edges are listed in the call to ...
0
votes
1answer
37 views

Finding lines of similar attribute with respect to nodes connected to its both Ends

I have line networks with node generated for Start and End Point . how to check if a line has correct attribute with respect to point created at its End. for instance FuID_Line = ABC_BDQ and Start ...
1
vote
1answer
156 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' ...
0
votes
1answer
321 views

How to update/delete data from a datagridview?

I wanna be able to update/delete data from a datagridview, and when I do that of course the data in my PostgreSQL database should be edited too. So I've thought about giving the user the ability to ...
2
votes
4answers
191 views

Split lines into non-overlapping subsets based on points

Given a table with line geometry, and one or more points that are snapped to this line in a separate table, I would like to split each line with one or more intersecting points at each of the ...
2
votes
1answer
30 views

am I setting up data from google geocoding correctly for ST_DWithin search?

Sorry to ask a basic question, but I have not been able to find this laid out entirely anywhere. I am mostly relying on this SO post: What Spatial Reference System do I store Google Map's Lat/Lng ...
2
votes
2answers
225 views

Update/refresh edited PostGIS table in QGIS

I imported a PostGIS table (with geometry) from my PostgreSQL database as a layer in QGIS. Later, I edited the table using PostgreSQL UPDATE commands. Is there a way to quickly update (like a refresh ...