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

1
vote
1answer
81 views

Problem with using a circle as polygon for querying PostGIS

I'm trying to query PostGIS and find some object features that intersect with a circular buffer created by the user using OpenLayers, JavaScript and PHP. I use the following code for creating the ...
2
votes
1answer
137 views

Problem with reading data from PostGIS as KML file using PHP

I am using the following PHP code in order to read data from PostGIS and save it in KML format as a file. When I load the page a document with ".PHP" extension is returned (not .kml) which inside has ...
2
votes
2answers
152 views

Problem in running query on PostGIS using PHP

Would you kindly help me solving this problem. I'm trying to use the PHP code provided here in order to read geo-data from PostGIS. The code seems clear without any problem (also nobody has ...
2
votes
1answer
287 views

Add PostGIS spatial functions to a custom schema other than “public” in PostgreSQL

I am new to PostgreSQL and PostGIS. Recently, I created a PostGIS 2.0.3 database on a PostgreSQL 9.1 database server using pgAdmin. The "PostGIS" extension was found installed in "Extensions". Al ...
3
votes
1answer
873 views

Loading Shapefiles into PostGIS using shapefile import/export manager

I am a complete beginner with PostGIS. I've started learning it using the tutorials provided by Boundless. In section 4 of this tutorial where I want to import shapefile in PostGIS, I do not have the ...
0
votes
1answer
78 views

Routing result not showed up [closed]

I'm following the http://workshop.pgrouting.org/ but my routing result not showed up at all, like the picture below: my firebug also didn't give me an error, I'm using geoserver 2.4.2, postgresql ...
1
vote
5answers
386 views

Problem installing PostGIS on Ubuntu Server 13.10

I've installed PostgreSQL 9.1 and postgis on Ubuntu Server 13.10 as follows: sudo add-apt-repository-ppa:ubuntugis/ubuntugis-unstable apt-get update apt-get install postgresql-9.1-postgis then I ...
2
votes
1answer
53 views

Is there a way to use some sort of “instancing” when storing polygons in a spatial database?

I am quite new to GIS database addons, and I am still exploring the possible uses for them. In general the idea of storing objects indexed by their position which enables additional operations is ...
3
votes
0answers
141 views

POSTGIS SQL - How do I remove (defined) sliver polygons

I would like assistance in writing SQL (for POSTGIS in postgresql) to remove sliver polygons (including long narrow slivers and some small irregular polygons that were erroneous 'gaps' in the original ...
3
votes
1answer
669 views

Copy a spatial table from one PostGIS database to another PostGIS database

I have two PostGIS databases on two different servers. The first server is PostGIS 2.0 and the second server is PostGIS 1.5. On the PostGIS 2.0 I have a table "lakes" with MULTIPOLYGON geometry ...
2
votes
1answer
211 views

PostGIS: How to ST_Clip() a raster with a polygon?

I have done: Import a SHP file into PostGIS by PostGIS SHP loader GUI. Import a raster into PostGIS: \raster2pgsql -I -s 4326 landsat.TIF -t 500x500 public.landsat > query.sql After importing ...
0
votes
1answer
131 views

Python Geoserver gsconfig create resource from Postgis store table

I've working Workspace and PostGIS store in GeoServer. I would like to use python and gsconfig to create new resource/new layer from existing PostGIS table, with: computing bbox, adding abstract, ...
1
vote
2answers
70 views

ST_Length (GEOM, true) for calculating distances in Geographic Reference System

Good afternoon all, I use (1) ST_Length (ST_Transform (geom, 3395)) to get distances in meters from points in Geographic Reference Systems EPSG: 4326. The thing is I found that with (2) ST_Length ...
2
votes
1answer
122 views

GeoDjango: read geometry column in geography field

I have a Django application that needs to work with an existent PostGIS database, apart from its own database. I've configured multidatabase support, created a database router, created models for the ...
2
votes
1answer
70 views

PostGIS ST_SummaryStats

I need some help writing the sql for returning the "MEAN" value from a raster(in postgis db) that intersects a defined(inquery) polygon(in postgis db). The polygon layer is called: ...
0
votes
1answer
47 views

Where and what format GIS data is suitable for me? [closed]

I am a student on computer science.Now , I am on a competition which is to develop a taxi recommendation system for Beijing ,China. I am now looking for the GIS data of Beijing. The key step is , ...
0
votes
2answers
55 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
76 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
61 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 ...
7
votes
1answer
220 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
51 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
242 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
112 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
168 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
154 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
83 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
86 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
76 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
51 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
279 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
316 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
24 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 ...
1
vote
2answers
1k 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
187 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
90 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
66 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
47 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
76 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
40 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
229 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
0answers
38 views

Django application “GeoNode” gives message “DLL load failed” on windows

I'm trying to install GeoNode which is a Django application on windows through these simple steps on this page. I've reached a point where is the GeoNode is installed and I've created my postgres ...
0
votes
1answer
94 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
37 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
16 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
512 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 ...
0
votes
0answers
40 views

drupal cartaro ask me postgis 1.5

I would install drupal cartaro, I have a host service with postgis 2.0 and a service with geoserver installed. Cartaro recommend me to use postgis 1.5. Do you know some solution for to use pg 2.0? I ...
1
vote
1answer
116 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
73 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
28 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
102 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 ...