PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.

learn more… | top users | synonyms

4
votes
1answer
590 views

Using PostGIS for a large trajectory dataset

I have a spatial trajectory dataset which basically contains about 10E6 (lat,lon,time)-tuples, grouped together by an identifier so they form trajectories. Currently, SQLite is used to store the raw ...
3
votes
0answers
516 views

How to import PostGIS layer with geography type to QGIS?

I tried to import in QGIS a layer from a PostgreSQL table with a geography type column created through the extension PostGIS. I noticed that QGIS doesn't seem to like the geography column... Here ...
1
vote
2answers
4k views

Converting mulitlinestring to linestring in PostgreSQL with PostGIS? [duplicate]

I am using postgres with postgis and I have a set of points which I would like to interpolate with a set of lines. Now my problem is that the set of lines are of type multilinestring. Is there a ...
2
votes
1answer
212 views

St_buffer width issues

I am using postgres with postgis for spatial data and ArcGIS for visualisation. I am really confused regarding what units the st buffer function uses because when I insert just the value 1 as ...
2
votes
1answer
522 views

How to obtain closest point of point over polylines layer in PostGIS 1.4 (without st_ClosestPoint)?

I´ve got a polylines layer (pipes) and a points layer (valves) and In Postgis 1.4 I would like to obtain the closest points but exactly on the closest polyline. In other words, i need to locate each ...
4
votes
2answers
474 views

PostGIS algorithm to unite points of two geometries that are within specified radius

I want to find an PostGIS algorithm to unite points of two geometries that are "near" to each other. That is: I want a function, that takes as input two geometries, and returns 1 geometry, that ...
1
vote
1answer
134 views

Installation problem for pgrouting

When compiling pgrouting from source for Ubuntu 12.10, I got the following error message. The version of boost is 1.52, is it too new for building pgrouting? [ 37%] Building CXX object ...
2
votes
4answers
255 views

How can I find features that do not touch any other feature?

How can I find features that do not touch any other feature? I have about 4000 pipeline elements and I want to know which of them are separated from the network. I tried with: SELECT h1.gid FROM ...
3
votes
1answer
410 views

PostGIS: Using a polygon to 'mask' linestrings returns both multi and linestrings

I have a table of linestrings (OSM roads, in fact) that I'm displaying on a map. I want to filter them so that only those within a certain area are displayed- I've already done this with the coastline ...
3
votes
2answers
2k views

Merge polygons in postgis

I have a hand-digitized coverage stored in postgis. There, I have a few shiver-polygons I would like to get rid of by including them into one of the neighbouring polygons. are there any commands that ...
7
votes
2answers
2k views

QGIS or Postgis - How to split polylines with a point layer?

In QGIS, I would like to split the polylines in a layer loaded in the workspace with the points in another loaded layer. If a point intersects a polyline, this polyline should be transformed into two ...
1
vote
2answers
680 views

QGIS create layer with the points of the beginnings and ends of a polylines layer (without duplicate points)

In QGIS, i would like to create a new layer containing the beginning and end points of a polylines layer, but without the duplicate points that would result of adjacent polylines.
5
votes
2answers
744 views

PostgreSQL, PostGIS and GeoServer publishing 1.7 million records

I have a polygon geodata in postgresql and I am publishing out to geoserver the 1.7 million records. How long is too long when processing? EDIT: Forgot to mention that I successfully published a ...
2
votes
3answers
1k views

How to find closest point on multi line String from a point in PostGIS

I want to find out the nearest point on my road network which is a multiline string from a point with lat lon value. I have tried the following codes but it giving a error message that my road network ...
3
votes
1answer
1k views

Importing grib, grib2, netcdf to PostGIS

According to grib2 to raster? (grib2 -> raster2pgsql -> PostGIS 2.0 -> GeoServer), it seems like that grib2 can be treated as raster directly. Is it the so called "standard" way? How about ...
18
votes
3answers
2k views

Geometry column naming convention - 'geom' or 'the_geom'?

I'm starting my first PostGIS project, and in various books and tutorials I've seen the geometry column labelled either 'geom' or 'the_geom'. Is one more conventional than the other? Furthermore, is ...
3
votes
1answer
288 views

PostGIS Trigger doesn't work

The trigger below don't works and I need that when a new pipeline (adutoras) is inserted or updated, the procedure check what are the municipalities (municipios) that intersects the pipes and put the ...
1
vote
0answers
216 views

Geoserver WMS and filtering tables with cyrillic column names

I try to serve PostGIS tables with Geoserver WMS (both 2.1 and 2.2). Some column names are in cyrillic. Problem is - service fails, when I try to filter by those cyrillic columns (both with CQL and ...
2
votes
1answer
534 views

How to add Custom data (like for Indoor floors) and find routes using open source software?

I am a newbie to GIS platforms so maybe whatever I am asking is very simple or obvious. I have read documentation/tutorials and as a last resort I am posting here, so any help is appreciated. I am not ...
4
votes
1answer
114 views

Why does only one of the following queries throw an error?

There are 2 SQL queries: SELECT wkb_geometry FROM building_polygon WHERE ST_Contains(wkb_geometry, ST_GeomFromText('POINT (29.4 60.1)')); SELECT wkb_geometry FROM building_polygon WHERE ...
1
vote
2answers
786 views

Turn-by-turn direction using PgRouting [duplicate]

How can I generate turn-by-turn directions using PgRouting? At the moment, I have a web-page where a user can enter and start/end location and a route is generated on a map (using PgRouting and ...
6
votes
2answers
2k 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
0answers
128 views

How can I assign road names from OSM to gis linestrings using open source tools?

Starting with a shapefile of linestrings I want to assign street names to these lines if there is a match with a road/street in OpenStreetMap. There are no exact matches as the linestrings have a ...
0
votes
1answer
155 views

How to use bbox in long/lat with google/bing/etc… using mapserver‏

The bbox of OpenLayers.Control.GetFeature works in utm when the baselayer is 900913 ie. google/bing/etc) and in long/lat when the baselayer is 4326 (ie. my postgis layers served by mapserver), no ...
2
votes
1answer
662 views

Geometry valid in PostGIS turns out to be not valid in Oracle

Geometry is in PostgreSQL database. It is valid. Geometry is exported as GML and then inserted into Oracle database. Then function SDO_UTIL.RECTIFY_GEOMETRY(geometry, tolerance) is called, which ...
6
votes
2answers
3k views

QGIS returns “Invalid Layer” message when trying to add Postgis view

I'm new to Postgis and Quantum GIS. I created a view defined as CREATE OR REPLACE VIEW pupr.vstudentmuni AS SELECT m.id AS munid, m.name AS muname, m.geom, s.code, (s.name::text || ' '::text) ...
1
vote
1answer
555 views

Automatic bulk snapping with FOSS

I'm looking for a tool that would be able to automatically snap features closer than a given distance. Is there such a tool/plugin for QGIS/GRASS/OpenJump? Would it be possible to achieve that with ...
9
votes
1answer
380 views

How to add topology to PostGIS 2.0?

I have installed PostGIS 2.0 and need new topology but it doesn't seem installed by default. I found a lot of command line to install postgis 2.0 with topology but is there a way just to add topology? ...
7
votes
2answers
862 views

Having Trouble with ST_Buffer and ST_Union

I am trying to build a coverage map, and measure how well a given set of points covers the target area. I started by writing a query like this: SELECT cartodb_id, ...
3
votes
0answers
377 views

Creating Ellipse in WGS84, but with metric parameters

I have the function --Ellipse(x,y,rx,ry,rotation,#of segments in 1/4 of ellipse) SELECT ST_Translate( ST_Rotate( ST_Scale( ST_Buffer(ST_Point(0,0), 0.5, $6), $3, $4), $5), $1, $2) I have points in ...
1
vote
1answer
198 views

What are FLOOR and CEILIING in PostGIS designated for?

Just a short question to lighten up my understanding of some PostGIS-code: Regarding the creation of user-defined grids I often find the expressions CEILING and FLOOR. Like in this non-representative ...
2
votes
1answer
1k views

Spatial Data from Postgis to Java/REST with RestEasy + Jackson

I'm developing an application where I take a route from google maps, save it in postgresql/postgis. I'd like to take this route (LineString geometry) and send it back to Google Maps. I already can ...
2
votes
3answers
678 views

ST_Covers: Geography Implementation is not working, Geometry Implementation taking too long

I have a query: (This query uses geographical implementation of ST_Covers function) SELECT ST_Covers(ST_GeoGraphyFromText('MULTIPOLYGON(((179 -89,179 89,-179 89,-179 -89,179 ...
5
votes
1answer
3k views

Install PostGIS on Ubuntu 12.04

I am trying to install PostGIS on Ubuntu 12.04 and I think everything is installed correctly except for postgresql. I followed this post. I get the following error and nothing I do seems to satisfy ...
1
vote
1answer
339 views

pgrouting shortest path result in wrong order

I am using the Dijkstra shortest path algorithm to plot a route between two points using the latest version of pgrouting in postgresql 9.1 with postGIS 2.0.1. I am able to get a correct result ...
-1
votes
1answer
86 views

OpenLayers app on another site [closed]

I use OpenLayers, GeoServer and PostGIS in my application. app is served on apache httpd. and geoserver is served on apache tomcat. I use vector/wfs requests to display the features, so I use ...
2
votes
1answer
149 views

postgis values within XYZ viewport in openlayers

I got this XYZ server where I get my maptiles. Now, when the user is at zoom level 1 ( closest). I want it to execute a command that gets the current viewport from the map and Queries my PostGIS ...
2
votes
0answers
319 views

Different results given by PostGIS and MySQL?

I'm developing a spatial database of administrative areas. I started out with PostGIS, but as MySQL is being used in our other projects, I thought I would at least try to create a spatial-enabled ...
1
vote
1answer
580 views

In what situations would SpatiaLite be selected over PostGIS, and vice versa?

I know that SpatiaLite is a lightweight solution. Would it be a problem if I put it on a 5K pageview/day site? Is PostGIS too resources-consuming for such usage? The dataset is something like < ...
1
vote
3answers
346 views

Is it possible to create a PostGIS sequence to populate Area column of a polygon

I've created Postgres/PostGIS sequences before to assign unique gid values when a feature is created in QGIS but is it possible to create a sequence that will automatically populate an area column? ...
0
votes
1answer
471 views

How do I fix out of bounds geometric extent error?

I'm new to GIS, and I'm roughly following the instructions here: http://mapbox.com/tilemill/docs/guides/postgis-work/ to try and import data I obtained from here: ...
1
vote
1answer
2k views

Split linestring to smaler lines

Hi I need help splitteing a linestring into smaller linestrings, using postgis. I need to route to closest point on the linestring, so i need to have more points on the line Sample Linestring = ...
2
votes
1answer
106 views

What is the PostGIS function for retrieving buildings by road side?

I want to get information of buildings by the road side only. Assuming that the building table has multi-polygon geometry and the road table has multi-linestring geometry, what would be a pgSQL Query ...
2
votes
2answers
201 views

Problem with SPIT (error while importing layers to POSTGIS)

I was attempting to import a polyline roads layer into postgis, using both SPIT in QGIS 1.7 and postGIS GUI for this purpose. I have received errors through both processes as described here: SPIT ...
7
votes
1answer
701 views

How to make working with Postgis vector layers in QGIS faster?

I have just imported a Spatialite database into Postgresql/Postgis. The problem is: using QGIS to work with them is much slower in Postgis (spatial indexes created) than doing the same in Spatialite. ...
7
votes
3answers
1k views

Raster to vector conversion

I have a bunch of raster maps from a general plan of a city. Examples: Areas reserved for federal, regional and municipal buildings Special land use zones Zoning Risks of occurrence of emergencies ...
0
votes
0answers
24 views

postgis: no module named psycopg2 [duplicate]

Possible Duplicate: psycopg2 error with QGIS 1.5 When I open DB Manager in QGIS I get what appears to be an error message at the bottom of the window:- postgis: no module named psycopg2 ...
5
votes
2answers
2k views

PostgreSql query problem with aggregate functions

I need help with a PostgreSql query. I need to find all parcels which have bigger area then average. I'm using this query: SELECT OBJECTID FROM parcela WHERE ST_Area(geom)<(SELECT ...
4
votes
1answer
244 views

Does Oracle MapViewer support PostGIS?

I use Oracle MapViewer to generate my mapping data and currently I'm using an Oracle database as my spatial back-end. I would like to move my data over the PostGIS but I can't find any references if ...
5
votes
1answer
771 views

Converting polygon values to a vector grid using PostGIS

What is the best way of converting a value from irregularly shaped poylgons to a polygon grid using PostGIS? I have a set of polygons that look like this: and I would like to overlay a grid on ...