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
0answers
76 views

Unable to Add Features to PostGIS Layer in Quantum GIS 2

I am testing out Quantum GIS 1.9-master and I've noticed that I am only able to add features to a PostGIS 2.0 layer if that layer is in a schema with the same name as my login. For example, if my ...
1
vote
1answer
491 views

How to populate the geometry column in a PostGIS table?

After loading a polygon shapefile into PostGIS, the geometry column (geom) is blank for several features. In one case, only a single feature has the geometry calculated and all others are blank. I'm ...
2
votes
1answer
187 views

Are there strategies for dealing with TopologyException errors in PostGIS 2?

Are there strategies for dealing with TopologyException errors in PostGIS 2? Nearly every function I run against two geometries results in a TopologyException (e.g. ST_Intersection, ST_SymDifference). ...
1
vote
1answer
735 views

How to split line layer at polygons' boundary of a polygon layer?

I have a line layer and a polygon layer in PostgreSQL 9.2, PostGIS 2.0. How can I split every line each time it crosses a polygon's boundary?
1
vote
1answer
74 views

How to speed up query through view in postgis?

I want to set up a postgis database that have some base tables, then the users interact with them through views (which restrict their viewable and acessible regions). The server runs PostgreSQL 9.2 ...
0
votes
2answers
240 views

Emergency Services: How to optimize routing by measured travel time?

I would like to optimize the service areas / catchment areas for an emergency service. Therefore, I have several measurement points on the streetmap, where people have stopped the travel time from ...
6
votes
2answers
1k views

PostGIS SQL query to find a polygon that intersects with a line

I need to build a PostGIS query that would select every polygon inside an area the river is flowing through. I'd better describe with an example below: There is a river (blue line) flowing through ...
1
vote
1answer
193 views

How do I convert MultiLines to MultiPolygons using Postgis

In postgis I'm using the following query to buffer lines to polygons: UPDATE rivers SET poly = ST_Multi(ST_Buffer(lines, 0.01)) where id = 1; The column 'lines' is a MultiLine and the column ...
4
votes
0answers
126 views

Joining layers with respective elements with PostGIS Topology

Recently I have started using PostGIS topology extension, but I have some difficulties in understanding how the structure works: One of the key points is the use of "layer"s: as of what I understand, ...
1
vote
1answer
102 views

Getting a “java.lang.OutOfMemoryError” error while importing raster files from PostGIS to Geoserver

I am trying to import raster data from PostGIS to GeoServer. I follow the instructions given on this link. ...
1
vote
0answers
31 views

error in loading raster tiles on postgreSQL [duplicate]

I am trying to import raster data from PostGIS to GeoServer. I follow the instructions given on this link. ...
5
votes
3answers
560 views

Snapping start- and end nodes of lines to other lines in PostGIS

There are plenty examples that show how to snap lines to points, but I haven't been able to find any (fast!) way of snapping the start- and end nodes of line strings to nodes of other lines. ...
3
votes
3answers
739 views

How to find lat/lon values for every pixel in a GeoTIFF file?

I want to a store GeoTIFF file pixel by pixel in the database. I need to store pixel values along with the lat/lon of that pixel on the GeoTIFF image. Is it possible to do that?
2
votes
1answer
195 views

Calculating points in the USDA's Cropland Data Layer coordinate system

I need to integrate against the USDA's cropland data layer. They've got a demo and some API docs. The important query I need to run is this, given an (x, y) of say (1551459.363, 1909201.537): ...
2
votes
0answers
227 views

operator does not exist: geometry <#> geometry

I'm running PostGIS 2.0 for PostGreSQL 9.2, and I have a customer who wants to know how close a provided geometry is to the nearest feature in a table. So I'm playing around with the "<->" and ...
1
vote
1answer
1k views

Postgis 2: Polygon/MultiPolygon in a single column

Storing MultiPolygon and Polygon features in a single column used to be as simple as not creating or removing the geometry type check constraint. Is there a similar simple fix in PostGIS 2?
3
votes
1answer
131 views

How can I check if a multipolygon can be represented as a simple polygon?

I have a large (30m+ records) spatial data set I have imported into a PostGIS database. I did not expect to find multipolygons in the data set, but it does have a few of them. I'd like to take a ...
3
votes
2answers
1k views

PostGIS: Convert meters to arbitrary spatial reference units?

I'm writing a query that needs to be able to work with data of any SRID. The basic problem is very simple - I get two pieces of information: A point (SRID = 900913) A distance (unit = meters) I ...
0
votes
2answers
620 views

How to draw line in leaflet using postGIS road data

I have few points from server and I want to draw a line with this point on road. But the leaflet drawing point to point line as shown in picture in orange color. But I want to draw the line ...
1
vote
1answer
210 views

How to update SRID in PostGIS database

I am facing a problem when I am trying to execute few queries in PostGIS. It returns the following messages. ERROR: GetProj4StringSPI: Cannot find SRID (4326) in spatial_ref_sys ********** ...
3
votes
2answers
291 views

How to clip from a point layer using postgis?

I've loaded a LIDAR xyz file into a PostGIS2.0 database and created a 3D point geometry column ("tblCLOUD") from the data. I've also loaded into the database a shapefile that contains six ...
0
votes
0answers
57 views

How a PHP script can perform point, line and polygon operation on Geoserver and PostGIS (+wkt) [duplicate]

I want to show my shape file and LULC map (vector and raster data) on internet explorer (locally). How should I configure PHP and Geoserver so that I can show data on localhost on an IE or browser? It ...
0
votes
1answer
364 views

How to show PostGIS distance in Meter

I have calculate distance from one point to a linestring. I have used the following query WITH data AS ( SELECT geom::geometry AS road_network from linestring) SELECT ...
2
votes
1answer
790 views

PostGIS ST_Contains question

Here's a quick summary about what I'm trying to do: Let's say I got two layers. One (A) with 10 polygons and one that is more granular with 100 polygons (B). Just to check if the behavior of PostGIS ...
4
votes
1answer
1k views

Error creating a spatial database. ERROR : could not load library “/usr/pgsql-9.1/lib/rtpostgis-2.0.so”

I am running PostgreSQL 9.1 with Postgis 2.0 on Fedora 15. When trying to install the raster support, psql -d mydb -f rtpostgis.sql -v ON_ERROR_STOP=1 I get the following error ...
11
votes
1answer
210 views

Naming conventions PostGIS Database

We are starting to build up a database with PostGIS. The database is supposed to be for a team of about 5-8 researches who work frequently with geodata and statistics. Has anybody experience with ...
3
votes
1answer
488 views

How to import ECW into my postgis database with raster2pgsql (windows)

I'm working on windows 7 64 bits, postgis 2.01. I have to import ECW files into my postgis database. Unfortunatly, my postgis seems to has been compiled without gdal ecw support.When i do a ...
1
vote
0answers
307 views

How to import 3D geometries from DXF, VRML or X3D into PostGIS 2

we plan to develop a webbased 3D GIS using PostGIS 2 and GeoServer with a W3DS. The architecture works fine, but i have problems to import 3D geometries into PostGIS. The geometries come from AutoCAD ...
4
votes
0answers
190 views

PostGIS 2.0 st_geomfromgml using LineString fails with invalid GML representation

I am attempting to insert a geometry into a table using the st_geomfromgml function. The GML is being sourced from a Geoserver WFS request. The function call looks like this ...
0
votes
0answers
177 views

Create Polygon Overlay Handling Holes

How can I create a polygon overlay that correctly handles holes? This answer provides a method of creating a polygon overlay that does not handle holes. Can it be modified to correctly handle holes? ...
1
vote
1answer
482 views

Dynamically load and display shapefiles from PostGIS 2.0 into Mapguide using .NET

I have a C# mechanism for Loading shapefiles into PostreSQL/PostGIS now I would like to dynamically load it on Mapguide fusion template.In either C# or VB.NET code behind. Use case is: 1.use uploads ...
2
votes
1answer
94 views

problems setting up postgis and importing data

Using Postgres 9.2.3.1 on a new Mac. I installed Postgres from the dmg file that I downloaded from the Postgres site. I then installed PostGIS using stackbuilder. This all worked flawlessly so far ...
1
vote
0answers
188 views

Renaming Columns in Geotools FeatureType

I am attempting to build a simple java program that loads shapefiles into a Postgis 2.0 database. Everything is working out great except that I would like to be able to modify the FeatureType in the ...
2
votes
1answer
353 views

How to Find the Nearest Node from a Given Coordinate

I have already developed a table manually. It contains the coordinates and the distance of all the nodes, there is no geom field or any field related to postgis. But I want to find out the nearest ...
3
votes
2answers
1k views

PostGIS - incorrect result distance between two points

I am quite confused the way PostGIS is returning the result for this basic query. So I am trying to find the distance between two points 45.2714,71.2087 and 42.3739,66.39 and the distance should be ...
2
votes
1answer
644 views

How to visuilze PostGIS data in GeoJSON format with PHP

I need to visualize PostGIS Geometry column as an overlay of a Leaflet tiled Map. I started a question here ,but didn't get any simple and satisfied answer. So I am starting this question. I got an ...
5
votes
1answer
531 views

How to snap line string start & end vertex to the nearest point?

I have a point layer and a line layer. The points are road junctions, collected using DGPS, while the lines are the connecting roads, collected through Handheld GPS in tracking mode. As a result, the ...
19
votes
1answer
1k views

Nearest Neighbor problem in Postgis 2.0 using GIST Index (<-> function)

I'm trying to use Postgis 2.0 new function <-> (Geometry Distance Centroid) in order to calculate, for each row of my table (cosn1), the distance to the nearest polygon of the same class. I was ...
1
vote
2answers
194 views

Is the PostGIS documentation correct for ST_Project?

In example of the page ST_Project the select is SELECT ST_AsText(ST_Project('POINT(0 0)'::geography, 100000, 45)); st_astext ------------------------------------------ ...
5
votes
1answer
527 views

Speed up pgRouting point_to_id using new <-> operator in PostGIS 2.0.0

The point_to_id function, which assigns a node id to a point based on existing nodes and tolerance, is using a query as follows: SELECT id, the_geom FROM vertices_tmp WHERE ...
0
votes
0answers
65 views

how to group interconnected edges inside a table?

Given a table and a random set of edges with source and target columns, how can I find out which edges connect with each other and then group them together using PostgreSQL?
1
vote
0answers
48 views

given sets of vehicle passing on each edge, how to get most used vehicle to avoid transition?

I have two tables: one, the resulting table from converting osm.xml via osm2po so I can use pgRouting, and another one that contains information on what edges each public vehicle passes through ...
4
votes
1answer
506 views

Transit Routing using pgrouting as core routing engine?

i'm a student and i'm working on a project. the aim is given two sets of coordinates(origin & destination) route through the map to determine the optimum path using public transportation and of ...
0
votes
0answers
781 views

PostGIS data visualization

I have dump my data in PostGIS from shapefile successfully. I made a postgres connection through PHP and that also returning the data of other field. But the main problem is GEOM field visualization. ...
1
vote
1answer
380 views

error performing wfs-t insert in postgres 9.1.4

I am getting error performing insert exception while performing wfs-t insert operation when i use postgres 9.1.4 and postgis 2.0. but i get successful insert when using postgres 9.0.1 and postgis ...
7
votes
2answers
496 views

How to get distance between one point and all other points in a table?

I have a table in Postgres with lat and long columns. Can I use the ST_Distance_Sphere or ST_Distance_Spheroid methods to get the distance between one point and all other points in the table? Do I ...
16
votes
1answer
183 views

Can we create views over a raster table in Postgis2.0?

Is it possible to create PostgreSQL views over a table that contains raster data? I have succeeded in creating the view but the entry in raster_columns is not correct (all the raster info is ...
2
votes
1answer
234 views

How to filter or query data in GRASS?

I have a PostGIS dataset with just over 2 million rows. Each row has a PostGIS geometry point value and several attributes. I'd like to do some analysis on certain subsets of the data, but I can't ...
2
votes
1answer
187 views

Problems with QGIS (v 1.8.0) layer labels [closed]

I have a PostGIS (v 2.0) layer representing lakes. The attributes "chinchar" and "chintrans" contain Chinese characters and Pinyin (Roman) characters in UTF8 format. When I use Layer -> Labeling in ...
2
votes
1answer
133 views

Join Zip Codes Table to Nearest City from Second Table

I have two tables, siteareas and ziplookup. The former contains large cities in the US; the latter all US zips with lat/lngs. I have a foreign key into the former table in the latter: sitearea_id. I ...