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

learn more… | top users | synonyms

8
votes
1answer
2k views

Hibernate Spatial 4 and Postgis 2.0

I'm having some issues integratings this technologies: Hibernate Spatial 4.0-M1 Postgis 2.0.2 (with compiled jdbc 2.0.2) Hibernate 4.1.1 The specific error is: Caused by: ...
3
votes
3answers
1k views

How do I apply Dijkstra's algorithm in Python with PostGIS data?

I have currently parsed OSM data, from a PBF file, into a pgRouting database with the use of osm2po, an excellent parsing tool. I don't however want to use the algorithms provided by pgRouting and ...
2
votes
1answer
200 views

How to configure and install psycogpg2 - beginner?

I need to install psycogpg2 for working with 'django'. I read the instructions but I dont understand whether to run the commands in command prompt or in python command line. I am lot used to the GUI ...
3
votes
2answers
239 views

Unit testing with postgis 1.5 and django

I'm trying to get some unit tests working in Django/PostGis. When the test database is formed, it doesn't have the postgis and postgis_topology extensions installed. Is there a way to issue commands ...
4
votes
2answers
538 views

PostGIS stored procedures

I am wondering if there are open source applications that make extensive uses of the special functions (the ST_* stored procedures) provided by PostGIS? I found many apps that support storing map data ...
1
vote
1answer
1k views

How to create shortest route and multiple routes service using openlayers?

I created a digital database of many important features and locations of my city. and I want to create a web application in which shortest distance between two locations can be calculated and ...
1
vote
1answer
95 views

When we type an address in search bar, in some web mapping applications like google maps, a list of words automatically displayed from the database.

What is actually happening behind the code and how should be the code? when we search for a specifc word, will it look in the database (here it is postGIS) and lists the similar words.
2
votes
0answers
282 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 ...
1
vote
0answers
145 views

django + apache mod_tile

I'm not sure if I'm doing this right and I need your opinion on this current situation. I'm creating a Web Interface using django and postgres as the database. With regards to the slippy map, I went ...
12
votes
5answers
6k views

How best to fix a non-noded intersection problem in PostGIS?

I'm using a PL/R function and PostGIS to generate voronoi polygons around a set of points. The function that I am using is defined here. When I use this function on a particular dataset I get the ...
5
votes
1answer
780 views

PostGIS - Why are my ST_Union results (stored in a new table) outputting as points and not polygons?

I've decided to move to PostGIS to merge polygons rather than spend hours doing in in QGIS. However, I'm hitting an issue where the results of an ST_Union query are being stored, or at least outputted ...
1
vote
1answer
92 views

How to get routes in the database that intersects circle?

I have routes (linestrings) recorded in the database. I want to create a query which returns the routes that have some commonality with a circle whose center and radius are passed as parameter. I ...
1
vote
0answers
260 views

Why is not ST_GeomFromEWKB() working?

The following SQL is working fine from the terminal: SELECT MIN(ST_Distance( ST_Transform(ST_GeomFromText('POINT(-3.163916 55.926528)',4326),32630), ...
1
vote
0answers
188 views

Query to find lat/lon of a house by street.name & house.number

How can I get house coordinates (latitude, longitude) by street.name and house.number? If it is possible, how I can get it? Many thanks!
1
vote
1answer
509 views

Problem connecting to localhost PostGIS

When I try to connect to a small localhost PostGIS database using QGIS, I get the error message: FATAL: no pg_hba.conf for host "fe80::4528:3236:418a9e7b%10" user "postgres", database "nyc", SSL off ...
3
votes
1answer
696 views

Does ogr2ogr Convert from PostGIS to File Geodatabase (FGDB_BULK_LOAD YES) work?

I am trying to export a lot of data from a PostGIS database to a File Geodatabase. The command I used to use was ogr2ogr -progress -append -f "FileGDB" -gt 66536 -sql "SELECT * FROM line" ...
3
votes
1answer
911 views

Routing with multiple points

I am using postgreSQL, postGIS and pgrouting. Now I am really confused on how am I going to find the shortest path between multiple points. I know how to find it between two points through dijkstra ...
4
votes
2answers
2k 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 ...
3
votes
1answer
2k views

Where to find shp2pgsql windows binaries?

Is there anywhere available shp2pgsql binaries for windows without installing the whole PostGIS? I particularity need the command line version of that import tool. I would like to share a batch ...
4
votes
1answer
258 views

How to use -lco options in gdal_contour?

I'm trying to create contours from geotiff raster with gdal_contour. My output format is Postgresql and I would like to ovewrite the existing table. When I do: gdal_contour -a 1 -f PostgreSQL -i 50 ...
5
votes
3answers
1k views

How to migrate PostGIS spatial data to MsSql spatial data?

am trying to migrate PostGIS geometry to SQL server Spatial data. which ETL i have to use. it's the first time i'll work with SQL server Spatial. is there any Data ETL model that do this migration. ...
3
votes
1answer
422 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
422 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
3k views

mulitlinestring to linestring

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
180 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
425 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
423 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
116 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
233 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
360 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 ...
2
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
622 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.
4
votes
2answers
623 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
752 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 ...
15
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
250 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
175 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
426 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
107 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
638 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
106 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
132 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
540 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 ...
3
votes
1answer
2k 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
430 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
360 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
690 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, ...