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

learn more… | top users | synonyms

2
votes
1answer
421 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 ...
2
votes
1answer
1k views

Quantum GIS 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
310 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 ...
8
votes
1answer
330 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
555 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
254 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
166 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
785 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
481 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
263 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
84 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
119 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
263 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 ...
2
votes
1answer
380 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
243 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
366 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
1k 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
99 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
163 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
526 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. ...
6
votes
3answers
763 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
23 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
1k 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
182 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
524 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 ...
5
votes
3answers
407 views

Trying to combine nearby points into a polygon

We have collected millions of cell phone strength readings. I am trying to group points of the same strenght that are within a distance of each other in to a polygon. I asked on the postgis mailing ...
5
votes
1answer
443 views

How to interpolate polyline or line from points?

We have a lot of points, but with no timestamps to create ways. For now, I've created a sample of the way the points traverse. It's in here, this way can be compared with a Google one. I haven't ...
3
votes
2answers
796 views

KML from PostGIS Geometry into Openlayers

im getting the KML value from my postgis database.. st_askml() And the output is like this: ...
1
vote
1answer
208 views

Is PgQuery for QGIS still available?

I was wondering if PgQuery for QGIS is still available. I am trying to install it on some new machines with QGIS 1.8.0 and I can not find it in the Python Plugin Installer. Does anyone know of a ...
1
vote
2answers
236 views

Is it possble to set a PostgreSQL schema and table name as a variable in Mapserver?

In Mapserver it is possible to set a variable when connecting to postGIS. This way I have created an fill-in form where you can enter a postcode and then you get a result. How can do this with ...
3
votes
1answer
559 views

QGIS connection to PostGIS showing wrong TYPE

I've got a user that it trying to edit his polygon layer but gets a message PostGIS error while adding features: ERROR: Geometry type (Polygon) does not match column type (MultiPolygon) When you have ...
3
votes
1answer
552 views

How to set up a background map in WGS84 projection for interactive map?

I've started developing my own interactive map and I have some things which are not clear to me. I heard that OSM, Google maps and all similar maps use Google Mercator projection. But if I use that ...
5
votes
2answers
155 views

Append table in PostGIS - Geometry Violation

In PostGIS I have imported a shapefile - some of this is Invalid according to PostGIS. Following online help I have first split the invalid polygons into a new table: CREATE TABLE s_invalid AS ...
5
votes
1answer
121 views

Is adding a new table for every layer a good design idea?

Is it a good design idea to maintain separate tables for each layer in a PostGIS database?. Every layer is defined by users. A user creates his/her layer say ATM location. Thats meant by defined by ...
3
votes
3answers
635 views

Geoserver, PostGIS and Postgres setup better on which web server?

Is it better to have Jetty or Apache as a Webserver for GIS stack?
8
votes
3answers
331 views

Why doesn't pgRouting return the best path?

Let the next portion of a graph: When I use the function shortest_path between the points A and B, I got the blue path. Why does this happen?
3
votes
0answers
96 views

How to PGRoute from OpenLayers via PostGIS/PostgreSQL [duplicate]

I need to route a shortest distance for a map which I have loaded from a PostgreSQL by means of JSON file. I can project the map in my browser and I can identify the linestrings. For a particular ...
3
votes
2answers
260 views

how to search for a Point of MultiLineString geometry in a json file using OpenLayers

I have a json file with large geometries(MultiLineString), here I got a Point among the json layer(baseLayer). I would like to search for a Point's LineString in the layer, from which MultiLineString ...
2
votes
2answers
1k views

KML from EPSG:4326 to EPSG:900913

im trying to create KML files manually (XML format) by extracting data from a postGIS database with "geography" values in a column. But i belive i need to transform the projection of each row in the ...
2
votes
1answer
102 views

How to save the edited features on a layer back to postgis table?

I have postgis + openlayer+ geoserver. I have developed an app which can show layers from postgis DB, allow user to edit,add,view features on a vector layer. Now, my need is to save the edited or ...
3
votes
1answer
270 views

PostGIS: worldwide area calculation

I have a table with polygons in EPSG 4326. These polygons are distributed all over the world, for example: POLYGON((10.7324632658845 59.9253049236956,10.7331908150806 ...
7
votes
2answers
632 views

How to find the nearest city for a POI in a OpenStreetMap/PostGIS database?

I'm interested in finding additional data for the POIs in OSM database. Currently I can use the following SQL for getting the name+long+lat for all the POIs SELECT name, x(transform(way, ...
7
votes
3answers
2k views

How do I get the area of a WGS84 polygon in square meters?

The following gives me the area of the polygon in square degrees: SELECT ST_Area(ST_GeomFromText('POLYGON((871325.790874952 6105405.3261047,871418.748307692 6105359.72944624,871346.22022442 ...
7
votes
2answers
537 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 ...
4
votes
1answer
323 views

postgis create geom from lat long

I ran this query successfully, but the column highwayid isn't updated as expected: update unique_latlongs set highwayid = (SELECT h.osmid FROM rn.highways h WHERE h.geom && ...
4
votes
2answers
487 views

QGIS saving analysis output as Postgis table

i am using QGIS and Postgis together. I can load data in Postgis and than i import it to QGIS. But i am trying to save an analysis output (example: buffer analysis, voronoi polygon or SEXTANTE ...
13
votes
5answers
414 views

What in-depth spatial database systems tutorials exist?

Is there a good tutorial that explains in depth the internals of a GIS and a spatial database system such as PostGIS with examples and without any background assumption? I'm specifically looking for ...
1
vote
1answer
188 views

Is the GIS Repository In Ubuntu in a different stream than the main repository?

I was checking out this: https://wiki.ubuntu.com/UbuntuGIS and it outlines how to install PPA for GIS. I performed a basic apt-cache search on a few things and QGis and mapserver are available. Such ...
1
vote
1answer
351 views

Is it possible to use Leaflet, PostGIS and PGRouting for web mapping?

I am newbie at Open Source GIS. I have already create a web mapping using custom tiles and leaflet. I have used my my own database. Tilemill was used to create the tiles and leaflet was used to ...