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
1answer
124 views

Help loading Raster to PostGIS 2 .0

Similar questions have been asked, but since my reputation is not enough I am unable to comment on answers. (The following is from an answer by nickves for this question Loading raster data to ...
2
votes
1answer
46 views

Compare features in PostGIS with updating attributes

I have two polygonal layers: "existing" and "modified". Attribute table of "existing" and "modified" layers have same column "feature_id" - number of feature. Please help me create query which write ...
2
votes
1answer
61 views

How to compute the distance from the beginning of a line for every points using postgis

I have a line, for which I need to know, for every point that compose it, what is the distance from the beginning. The data is stored in PostGis 2.0 For example, for the line with the point a, b, c, ...
0
votes
1answer
336 views

How to find the intersection point of polygon geometry and multilinestring geometry in postgis

I have a polygon geometry and multilinestring geometry. How do i find the intersection of both these geometries. Both the geometries are in same reference system. Does st_intersection gives me the ...
3
votes
1answer
49 views

Speeding up raster to point set function

I have written the following function that takes a raster (always non-skewed) and returns a set of points. As I'm executing it millions of times in my queries, I'd like for it to be super-optimized ...
3
votes
1answer
153 views

For which operations a PostGIS Geography index is useful?

I need to do KNN- and within-region queries for POI data. I store the POI locations in a geography column. Since I understand that ST_DISTANCE doesn't use the geography index, I added a geometry index ...
2
votes
0answers
45 views

Optimize ST_CoveredBy performance

I have a PostGIS 2.0.3 table with 113,862 records with multipolygons represented both as geometry and geography. There is a gist index on each of them. I'm running the following queries: SELECT *, ...
0
votes
0answers
53 views

pgRouting Win 7 installation problem

I have run into a problem installing pgRouting. Following Anita Grasers guide, I have gotten as far as to execute the three .sql files. The first sql file (routing_core) runs fine, but for the second ...
0
votes
1answer
129 views

How to calculate x, y, z, m in Postgis

Somebody know how can I calculate the x,y,z,m parameters from a MultiLineStringZM in Postgis? I would like to know x,y,z and m from the points what are made the polyline. When I try calculate it by ...
0
votes
1answer
42 views

Difference between st_length() and st_m()

My question is about the differences between st_length() and st_m() in postgis. The reason I ask this is because in a MultiLineString I canĀ“t calculate st_m(), but I can st_length(). Thanks.
3
votes
1answer
71 views

Force a collection of unknown number of points to be a polygon

I am working with point clusters and want to create the rough shape of the cluster in the form of a polygon using ST_ConvexHull(). I'm having problems with single outliers though, as they don't ...
1
vote
2answers
42 views

Does OSM2po handle squares and places?

OSM2po is converting data from OSM to postgresql. But how is it handled with places or squares? Not every places, square has pedestrian way routes on it. But for routing I need nodes and pedestrians ...
0
votes
1answer
162 views

Why postgis st_overlaps reports Qgis' “avoid intersections” generated polygon as overlapping with others?

I am implementing a postgis trigger on polygon layer to check and reject newly created polygon if it overlaps others. The problem shows when I digitize new polygons adjacent to others in Quantum GIS ...
1
vote
1answer
166 views

how to split a line by a point which is on the line but not in the linestring itself?

i need some help with the following: i have a linestring - geom i have $lat,$lon (using some php syntax) i have an osm table with the roads geom, i am trying to get closest point, and then split ...
1
vote
0answers
69 views

Working with ambiguous AddGeometryColumn functions

I'm using PostGIS to add geometry columns to tables, but keep receiving the error: ERROR: function addgeometrycolumn(character varying, character varying, integer, character varying, integer) is not ...
1
vote
1answer
1k views

How can I enable PostGIS Shapefile and DBF Loader 2.0 plugin in PgAdmin III?

I am on Windows and I want to download/enable the plugin "PostGIS Shapefile and DBF Loader 2.0". I installed PostGIS 2.0 using StackBuilder of PostgreSQL installer.
1
vote
0answers
38 views

How to load a raster from in-memory bitmap (not from file) into PostgreSQL

I have a bitmap in memory that I would like to load as a raster to PostgreSQL. An unfavorable option is saving the bitmap to file and then use raster2pgsql, but as we have several cameras that ...
1
vote
0answers
70 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 ...
0
votes
1answer
203 views

ST_Touches for more than just one geometry

I'd like to select some neighbor polygons with ST_Touches. Therefore I found the following statement: SELECT b.name FROM layera as a JOIN layera as b ON ST_Touches((SELECT a.geom FROM layera as a ...
1
vote
1answer
338 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 ...
1
vote
2answers
198 views

Start postgresql+postgis without installation on Windows

I have used Windows7x64 and want start PostgreSQL+POSTGIS without installation process. I copy PostgresSQl\9.1 folder from other laptop to c:\opt. I need create .bat file with enviroment variables and ...
1
vote
2answers
350 views

Trigger to fill attributes (data, client ip) in table for each new objects, PostGIS

In PostgreSQL/PostGIS database stores shapefiles. Client users software - QGIS. Please help me write PostgreSQL/PostGIS trigger, which for each newly added/updated feature in layer added 'time create' ...
0
votes
2answers
169 views

PostGIS, distance between two users

I have a simple table (location_test) with three column (name, geom , jid). geom is a geometry column with SRID 27700. I set the user's geometry position with: UPDATE location_test SET geom = ...
1
vote
1answer
70 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 ...
1
vote
1answer
137 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 ...
2
votes
0answers
98 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, ...
2
votes
1answer
290 views

How to connect Postgis database with/in Remote Servers…?

I am preparing a 'Web based map' application using 'Geoserver-Openlayers-Postgis'... Now, I am trying to connect my Postgis database(located at 10.50.110.11 location) with the following command from ...
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. ...
4
votes
3answers
343 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. ...
0
votes
2answers
183 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 ...
5
votes
1answer
392 views

How to install PostGis on EC2 micro-instance

I tried to install PostGIS on my Amazon EC2 microinstance using sudo yum install postgis2 and got following error message: $ sudo yum install postgis2 Loaded plugins: ...
2
votes
1answer
149 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): ...
1
vote
1answer
79 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. ...
2
votes
0answers
148 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 ...
2
votes
1answer
89 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
687 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?
0
votes
1answer
105 views

ImageMosaic-JDBC Error

I'm trying to get postgis raster layers in geoserver-2.3.1, with postgresql-8.4, postgis-2.0 and gt-imagemosaic-jdbc-9.1.jar support. I'm going through the tutorial with a PNG raster that i have. In ...
3
votes
1answer
116 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 ...
2
votes
2answers
888 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 ...
3
votes
1answer
283 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 ...
0
votes
1answer
197 views

tinyows failing to connect to postgresql - Ident authentication failed for user “postgres”

I'm getting the above error on a new and local tinyows installation on Centos 6. Postgresql 9.2, PostGIS 2.0. I can connect to PostGreSQL locally and from my LAN using several other methods (psql, ...
2
votes
1answer
142 views

Cannot find my schemas in QGIS's “Add PostGIS layers”

When I connect to my PostGIS database using QGIS's Add PostGIS Layers, I see only public topology pg_catalog information_schema My other schemas that I have created are not shown here. Anyone else ...
1
vote
1answer
429 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
126 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 ********** ...
6
votes
6answers
2k views

Unable to connect Postgis from QGIS 1.8.0

I have installed PostgreSQL and PostGIS on my laptop (Win 7 64 bit OS). I am running QGIS 1.8.0 on my machine . When I am trying to connect Postgis I am getting connection failed error then I tried ...
3
votes
1answer
272 views

PostGIS: Merge multiple table with same GID

I just imported some shapefiles with the PostGIS importer. Because several errors and issues I had to split my shapefile in multiple parts. Then I imported them one by one. I thought I can easily ...
0
votes
2answers
474 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 ...
0
votes
0answers
52 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
262 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
417 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 ...