Version 2.0 of PostGIS brought a heavy set of new extensions for the PostgreSQL object-relational database, adding greater support for spatial objects.

learn more… | top users | synonyms

0
votes
2answers
61 views

Select area which is at least x meters away from other geometries

In my table I have the build-up area from a region as a big number of polygons. urban_area: id | name | geometry(polygon) I was wondering if and how I would be able to find the area within a ...
1
vote
1answer
82 views

Get DISTINCT nearest neighbors with indexed search

I'm using the indexed nearest neighbor search to return the closest points to a given starting location. My points also have attributes like color and shape, stored as strings. I want each query to ...
1
vote
2answers
78 views

Ogr2ogr - shape to postgis - is there a way to use and preserve an existing primary key?

I've been struggling with this for a while, tried a few different ideas inspired by these pages: http://www.gdal.org/ogr2ogr.html http://www.gdal.org/ogr/drv_pg.html ...
9
votes
2answers
377 views

What is the precision of SELECT DISTINCT on PostGIS geometry column?

I wonder what the precision of the SELECT DISTINCT operator is on a PostGIS geometry. On my system, the following query gives me a count of 5, which means that the inserted points are considered equal ...
0
votes
1answer
63 views

Problem with double field type in postgis database

I have connection to PostGIS spatial database through ArcSDE, and all double type numeric fields are cutting numbers after comma. Does anyone know how can I fix this problem?
0
votes
1answer
353 views

How to install pgrouting 2.x on ubuntu 12.04 LTS

I try to install pgrouting 2.0 on ubuntu 12.04 LTS with postgresql 9.2 I have ppa in the system by sudo add-apt-repository ppa:gwibber-daily/ppa answer: `You are about to add the following PPA to ...
1
vote
0answers
136 views

identify subgraphs within planet_osm_line table

I want to identify subgraphs within the planet_osm_line table of the osm2pgsql-schema. those subgraphs are classified by certain tags i want to check. My first attempt was to do this recursively with ...
1
vote
0answers
222 views

Problem Installing pgRouting 2.0; libcgal8 dependency

I've been trying to install PostGIS and pgRouting on an AWS Ubuntu server (first tried 13.10, then reverted to 12.04, both 64bit "small" instance) for several days now but no matter what I do I keep ...
0
votes
1answer
231 views

Coordinate Conversion in PostGIS

I have some problem with the representation of the coordinates. I need to convert the coordinates from "EPSG: 32633" to "EPSG: 4326", and then create geometries in PostGIS. For the conversion (from ...
0
votes
1answer
99 views

PostGIS Transform distance or create a view

I have a postgis table that is updated on a regular basis so it is not practical to cast my geometry column to geography So can I modify the following query to convert a distance say 0.5k into ...
5
votes
0answers
101 views

What PostGIS [topology] provided tools may be used for data quality assurance?

I'm learning about techniques to ensure GIS data quality. Googling around, I've found a few papers about theory and best practices (here and here), and a couple of short presentations about the topic ...
0
votes
1answer
80 views

Installation extension functions to pgRouting

I'm trying to find sql source of functions routing_dd.sql and routing_dd_wrappers.sql I'm working on Windows 7 32bit. The only one link to that wrote by Underdark is empty: Both are available ...
1
vote
1answer
52 views

What is the complexity of neigborhood search in PostGIS?

I have a point with coordinates x and y. I want to know all the points in a square around this point, with side L. For this, in postgresql/PostGIS, I use: SELECT * FROM table_of_points WHERE ...
3
votes
1answer
440 views

osm2pgsql: Import data in custom projection

I have osm-file and I want to import it to the postgresql via osm2pgsql with custom projection EPSG:20022. I look to the help and found out any keys like -E EPSG: but when I try to do with it I get ...
2
votes
1answer
568 views

PostGIS: Calculate the length of just the portion of linestring that intersect with a polygon

I want to calculate the portion of the linestring that lies within the limits of a polygon. Better with an image What is the length of the portion of linestring within Province A? and within ...
0
votes
1answer
25 views

How to join two LinestringM into one without dropping M value?

I have, for example, two Linestrings with M value: LINESTRINGM(1 0 2, 2 0 4, 4 0 7) and LINESTRINGM(4 0 7, 6 0 9, 10 0 10) How can I merge them into one Linestring and preserve the M value? Expected ...
3
votes
2answers
2k views

What is the unit used in ST_Distance()?

I wonder what the unit is of the float being returned from ST_Distance. In the documentation it says: ...cartesian minimum distance (based on spatial ref) between two geometries in projected ...
1
vote
2answers
248 views

Postgis 2.0 - How to get a Point from given LinestringM and a measure?

If I have a cable route linear referenced and stored in a LinestringM with M value is the length (in meters) from the start of the route - for example: LINESTRING M (0 0 0, 10 0 20, 12 0 40, 20 0 50, ...
0
votes
0answers
160 views

Split lines at polygon intersection with attributes saving

This relates to this question but what about keeping the attributes. Having line_layer (id, geom, attribute1, attribute2) poly_layer (id, geom, attribute3, attribute4) How do I split the lines ...
0
votes
2answers
70 views

Adding shp files to PostGIS in QGIS 2

I followed this tutorial to set up Postgresql 9.1 and PostGIS 2 on my Ubuntu Server 12.04. I also installed pgAdmin III on my Windows 7 client. I set up a database landarch and user chadmwade, ...
0
votes
1answer
58 views

pgrouting 2: missing pgr_findnearestnodedwithin function

With the PgRouting 1.5 I was using the find_nearest_node_within_distance function and it works, but now I'm moving the project to PgRouting 2 + Postgis 2 + PostgreSQL 9.1, and now that function, I ...
1
vote
0answers
99 views

St_OffSetCurve with self-crossing lines

I have about 50,000 linestrings in PostGIS. They represent routes along roads. But I want them to be (roughly) pavements (aka sidewalks) instead. So I need to move all the lines 3 metres to the left ...
1
vote
0answers
49 views

Selecting a bounded area within a raster

I am new to postgresql. I have imported a 256kb sample raster (.tiff) into postgres with tilesize 100x100. Now I need to select the area (rectangle) from the center of the image using sql query. Then ...
0
votes
1answer
290 views

Pgrouting functions and geoms type not found. Install failed?

I have installed a postgresql 9.1 and postgis 2.0 from source. I couldn't launch this : # Add pgRouting launchpad repository ("stable" or "unstable") sudo add-apt-repository ...
0
votes
1answer
153 views

How to run ST_Intersects on a geometry from text and an existing table

I am developing a location based application that stores longitude and latitude coordinates in a string. I then (using PostGIS 2.0) need to use these coordinates and run ST_Intersects on it with the ...
1
vote
0answers
44 views

Is it possible to have run-time dynamic table updates to visualization using javascript interacting with postgis and geoserver

I have an idea of/have seen implementations, of dynamic map retrieval/updating using wms on openlayers by using updates to a postgis database which was hooked into geoserver and having a refresh ...
0
votes
0answers
17 views

Can't connect QGIS 2.0 to postgresql 9.3 remote server with postgis 2.1 [duplicate]

I am trying to connect qgis to my postgresql server using the add postgis layer option in qgis dufour. I am not getting any details from qgis other then 'connection failed check settings.' However, ...
1
vote
1answer
740 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
165 views

How Do I configure PostGIS 2.0 on windows to use ST_GeomFromGeoJSON?

I have installed PostGIS 2.0 on a Postgres 9.1 database on a Windows 2012 Server. I need to write an insert query, which uses ST_GeomFromGeoJSON(). The Docs for this query say that I need - JSON-C >= ...
0
votes
1answer
99 views

Difference between azimuth degrees when i use st_project in postgis

I have two points p1 and p2. SELECT ST_GeomFromText('POINT(92.78488163381019 55.9757874622428)', 4326) as p1, ST_GeomFromText('POINT(92.78482645521103 55.97564239375992)', 4326) as p2 ...
1
vote
0answers
30 views

What is the best way to manage permissions as root installing postgresql and postgis?

I've encountered an issue numerous times where I lock myself out of my postgres installation as a result of modifying my pg_hba.conf file and therefore screw up my postgres installation because I ...
1
vote
0answers
106 views

Is the postgis layer option in qgis 2.0.1 Dufour two way? Was the spit plugin built in?

I am trying to install postgresql with postgis on a remotely accessed terminal only installation of ubuntu 12.04 that I want to use to connect to qgis 2.0.1 and hopefully have a two way transfer ...
1
vote
2answers
346 views

Extract a LineString from LineString by two Points

I am using PostGIS2.0 and PostgreSQL9.3. I have LineString in Spatial-Ref 4326 like geom:= ST_GEOMETRYFROMTEXT('LINESTRING(60.7014631515719 56.8441322356241,60.7023117507097 ...
3
votes
0answers
78 views

Why are date vaules displaying a trailing 'Z' when layers are published with Geoserver and a PostGIS data store?

I have published various layers using Geoserver 2.2.x with a PostGIS 2.0.1 (PostgreSQL 9.1.x) data store. Fields that only have date values and not time/timestamp related values are stored as date. ...
0
votes
0answers
100 views

Error while executing Populate_Geometry_Columns() Postgis

I loaded data into postgis using easy loader(MAPINFO). Now when I run SELECT * FROM Populate_Geometry_Columns() I get error : WARNING: Could not convert '"SP_GEOMETRY"' in ...
0
votes
1answer
129 views

postGIS (?) - ST_Difference preserving attributes

EDITED QUESTION: PROPER SYNTAX FOR ST_DIFFERENCE BETWEEN TABLES? I have two huge polygon datasets from shapefiles, call them 'baselevel' coverage and 'deluxe' coverage. They each contain over 2.4 ...
5
votes
3answers
4k views

Error when trying to run Create Extension postgis

I have installed PostgreSQL 9.x and PostGIS 1.5/2.0 several times and have never had this problem. I just got a new CentOS 6.3 server up and running and and I have Postgres 9.3 functioning as ...
0
votes
2answers
99 views

Change column order in postgis 2.0

Is it possible to change the column order of a table in postgresql/postgis 2.0? If so, how is it done?
2
votes
1answer
462 views

How to save data from QGIS 1.8 to PostGIS without shapefile intermediate?

Is it possible to save data directly into an existing PostGIS database from QGIS without having to first save it as a shapefile? I know about the SPIT plugin but that requires a shapefile. I want to ...
1
vote
1answer
202 views

Error 'Invalid geography. Antipodal edge…' with Postgis

I have a table in postgis like this CREATE TABLE locations (id int, name VARCHAR(255), pos geography(POINT, 4326)); with a couple of points. E.G. INSERT INTO locations (name, pos) VALUES ...
1
vote
1answer
134 views

Is postgres 9.1.9 supported by ArcGis 10.1 Service Pack 1?

I want to install Postgres and Postgis. Now we use ArcGis 10.1 So I install Postgres 9.0.5 But there is not exist Postgis for this version. I try install postgis 2.0.3 But I fail(it is only 32 bit ...
5
votes
2answers
573 views

Why is any pgr_* routing function taking forever based on OSM data in an pgrouting enabled DB

I loaded the German OSM dataset into the pgrouting DB by using osm2po 4.7.7. Everything works fine i have osm2po set up via it's config and it's working like a charm through it's Java part. I had the ...
3
votes
1answer
641 views

osm2pgsql loses connection at end of import for large PBF, north-america-latest.osm.pbf

I just wanted to check and see if anybody else out there encountered this issue before I started diving into the code. I'm using osm2pgsql to import OSM data into my Postgres database. I encounter the ...
1
vote
3answers
126 views

PostGIS intersect on insert?

I have a large amount of point data that I have in CSV form. I am able to insert it all into a PostGIS table no problem. What I want to do though, is split the data up on insert into multiple separate ...
1
vote
1answer
176 views

Calculating area of MultiPolygons within 250m buffer of points

I am using using PostgreSQL 9.2 and PostGIS 2.0. I have two tables: 1) a geocoded table of home addresses (address_list) and 2) a table containing data on tree density in the same geographical area. I ...
0
votes
2answers
91 views

What queries can I use to select data?

Which queries can I use to select the following information: How many towns are within a distance of 3km of both a road and a railway and are within 6km of the coast? And any towns that have both a ...
1
vote
0answers
293 views

How to use pgRouting (pgr_drivingDistance) with GTFS?

I used gtfs2pgrouting to import gtfs data in postgresql, then I have these tables List of relations Schema | Name | Type | Owner --------+-------------+-------+---------- gtfs | ...
4
votes
3answers
661 views

What does the “service” box in the PostGIS connection dialog stand for?

Can sоmеbody explain me what to write in the "service" box when connecting to the local DB. QGIS Lisboa and Postgres are installed.
1
vote
0answers
832 views

“Schema does not exist” error trying to load raster using raster2pgsql

I receive a "schema does not exist" error when trying to load a raster to a PostGIS database (see full error at the bottom). The schema does exist in the database. This is the syntax I'm using: ...
1
vote
1answer
180 views

Can't view PostGIS rasters after changing schemas

I have loaded a few rasters into the Public schema of a PostGIS 2.0 database. Using the db manager in QGIS 1.8.0 I can add the rasters to the map canvas. After moving the rasters to another schema in ...