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

2
votes
0answers
6k views

Create a stacked bar chart with matplotlib [closed]

I'm trying to create a stacked bar chart in python with matplotlib and I can draw my bar one up the other # -*- coding: utf-8 -*- import psycopg2 import matplotlib.pyplot as plt import numpy as np # ...
-2
votes
1answer
745 views

Postgis error on select all intersetcs of a polygon [closed]

i can get all polygon on intersects this:-7.9245860488441 -37.122384500713,-7.9245860488441 -37.11904223938,-7.9233955716106 -37.1187601948 SELECT * FROM propriedades WHERE ST_Intersects( ...
3
votes
1answer
353 views

How can I find the nearest points (plural) on a line segment using PostGIS

I'm locating the nearest point on a line segment with PostGIS and ST_ClosestPoint, I can select the point on each of these line segments which is closest to the starting point. Which looks something ...
4
votes
2answers
1k views

How to render PostGIS raster with Mapnik XML?

I'm trying to manage raster files from PostGIS, which to be rendered using Mapnik. I used raster2pgsql to load those GeoTIFF images to PostGIS, and I think the loading process turned out OK. The ...
2
votes
2answers
886 views

Importing planet files into Nominatim

After a gruesome night installing PostgreSQL 9.1, PostGIS 2 and Nominatim 2 on CentOS 6.3 using the instructions here, I am finally at the stage of importing a US planet file. Problem: In ...
5
votes
2answers
1k views

Force SRID in views in Postgis 2.0

I have a very tricky problem: I have a Postgis 2.0 database, used as datastore for Geoserver 2.1.3 I have a table with a geometry column (named shape), with SRID 4326 I have created a view like ...
1
vote
1answer
979 views

PostGIS and geometry column

I have a csv table. Each record includes a start node (lat1,lon1) and an end node (lat2,lon2). I have already imported the .csv into Postgresql 8.4. Now I would like set the geometry column. I tried ...
2
votes
0answers
193 views

How could I make this PostGIS query run faster?

SELECT st_band(rast, 1), st_width(rast), st_height(rast), st_bandpixeltype(rast, 1), st_bandnodatavalue(rast, 1), st_scalex(rast), st_scaley(rast), st_upperleftx(rast), st_upperlefty(rast) FROM ...
2
votes
1answer
139 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 ...
2
votes
0answers
98 views

Are geotiffs with the embedded georeferencing information supported?

I am able to load raster data into my postrgreSQL data base however when I display in Quantum GIS the pixel height and width of the image is being translated into real world lat/lon coordinates, as a ...
1
vote
1answer
435 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 ...
5
votes
1answer
840 views

Are there limitations using a PostGIS out-db raster?

I have been trying to import a large raster into a PostGIS 2.0 database and hit a few stumbling blocks. Initially when I tried to import the raster using raster2pgsql, I would receive the following ...
2
votes
0answers
93 views

How to convert FROM Navit to PostGis or SHP?

I have a Navit BIN file which I want to use in PostGis or QGis, so I need to import it to PostGis or convert it to a shapefile. I have found a lot of information on how to convert data TO the Navit ...
-5
votes
1answer
349 views

How to create,store and retrieve the spatial data in postgresql [closed]

i am new to postgresql/postgis can anyone explain in steps about how to store the spatial data and retrieve the spatial data and visualise in map in a proper steps.. pls . its very urgent..
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 ...
6
votes
1answer
2k views

How to find the nearest point by using PostGIS function?

table A: lat | long | the_geom | code | sign 13.8433095 | 100.6360357 | 0101000020E61.... | ABC | start_point 13.7544738 | 100.5459646 | 0101000020E6..... | ABC | end_point 13.4124215 | 100.6232332 ...
0
votes
1answer
50 views

Can I use in a postgis db within the same table a combination of CRS?

I'm experimenting around with my postgis2.0 database. I want to create a basic table to store all my point data and in the process,I realized that the coordinates are in different CRSs. So naturally ...
1
vote
2answers
388 views

PostGis, export Svg in pixels

I'm new to GIS. It is very intersting. I have installed Postgis, insert shapefile, get data in SVG without problem (ST_AsSVG). Now, I'd like to export the same svg but in pixel to add it on top of ...
3
votes
1answer
394 views

How to Load RDF Data to PostGIS?

I want to load some sample RDF (Relational Data Format) to POSTGIS. Are there any tools or methods to do this.
1
vote
3answers
218 views

postgis under win 7 “on demand” not as a service

how do I install postgis2.0 under win 7 to run just on demand. I dont want to run it permanently as a service. Similary as the (nonspatial) mysql can be run on demand via the xampp-tools ...
2
votes
1answer
1k views

pgRouting: unable to execute routing_core.sql

I'm unable to execute the routing_core.sql, receiving following error. I'm using pgAdmin III, Windows 7, PostgreSQL 9.1, PostGIS 2.0. ERROR: could not load library "C:/Program ...
8
votes
2answers
277 views

Moving existing hard drive with PostGIS data directory to a new computer

I have a new computer that is replacing an old machine that has PostGIS installed. The old computer has a 2nd hard drive where the PostGIS data directory is stored. I want to move this drive over to ...
0
votes
1answer
355 views

How to use ST_Length?

I want to calculate the lenght of the line inside the polygon. If I do this: SELECT ST_Length(ST_Intersection(ST_Transform('SRID=3035;LINESTRING(4000000 3000000, ...
1
vote
1answer
398 views

Adding table from Postgis

While trying to import a table containing raster data in QGIS , Raster column is not being imported ... I am getting following messages: Database connection was successful , but the accessible ...
10
votes
1answer
701 views

How to get the length of a line inside a polygon

How can I get the length (brown marked part) of the "Road 7" inside the red polygon? My start: SELECT ST_Length(way) FROM lines WHERE road = "Road 7" AND ST_Intersects(line, polygon)? With that, ...
1
vote
0answers
95 views

Make a thumbnail of a raster in PostGIS

I'm fiddling around trying to create a thumbnail of a fairly large (originally 27MB) raster, chunked into 64x64 blocks. I've got the following and it works, quite well, but I'm wondering if there is a ...
3
votes
1answer
329 views

gdalinfo gives no georeferencing information for a PostGIS raster

I have a PostGIS raster dataset which I am trying to access via GDAL. I've had various problems with making this work, so thought I'd try running the gdalinfo command to check that GDAL can actually ...
3
votes
1answer
608 views

PostGIS 2.0 ST_Transform with Rasters cannot find custom SRID

I'm trying to calculate an average value in a buffer around a point. Given a raster in EPSG 4326 and a similar point, this is fine, except that the values will be skewed as they are not projected in ...
6
votes
1answer
3k views

PostGIS - 1.5 to 2.0 easy update

I have a PostGIS 1.5 database and want to update to 2.0. I read that because this is major release I have to follow the 'Hard update' procedure. However the spatial data I have is only test data so I ...
1
vote
1answer
123 views

How to select data inside a tile?

I have an OpenStreetMap PostGIS database and would like to select specific data (for example all shops) of each tile (on a defined zoomlevel) on the planet. Is this possible to achieve and if yes, ...
4
votes
1answer
776 views

remove duplicate points based on a specified distance

i have a table of points with each point acquired on a specified date, by a specified source, and having a measured value. i want to consider points as duplicates if they have the same date and if ...
20
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 ...
4
votes
1answer
1k views

How to design model in Django using GeoDjango?

I am using Postgresql 9.0 and PostGIS 2.0. I am using Django 1.3 and GeoDjango.I have model with id,latitude,longitude and placename. All the places are in USA. My requirement is following - User ...
5
votes
1answer
590 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 ...
2
votes
1answer
624 views

PostGIS 2.0 and Postgres 9.1: ST_Transform => failed to load NAD27-83 correction file (Windowsx 64)

after making a clean install with the latest stable release of postgis (2.0) i can't perform any transformations: SELECT ST_Transform(ST_SetSRID('BOX3D(2644033.2454124987 ...
18
votes
1answer
3k views

Comparison of geocoding solutions (such as Gisgraphy & PostGIS 2.0)

As I am sure many of you are aware, PostGIS has finally released Version 2.0 and included within this version they have also built a geocoder (see: http://postgis.net/docs/Extras.html). Although I ...
7
votes
2answers
2k views

Postgis 2.0 upgrade problem with postgres data?

I have a serious problem: on Wednesday, April 2 OpenSUSE 12.1 is updated, and the package was to update the PostGIS-a version 1.5.3 to 2.0.0. After this operation, Postgres does not display records. ...
10
votes
2answers
3k views

Intersecting a raster with a polygon using PostGIS - artefact error

I'm using PostGIS2.0 to do some raster/polygon intersections. I'm having difficulty understanding which operation I should use, and what the quickest way of performing this is. My problem is as ...
12
votes
4answers
9k views

Loading a raster into a PostGIS 2.0 database on Windows

I'm trying to figure out how to load a raster into a PostGIS2.0 database (I have asked previous questions on this topic here and here). I am trying to use the raster2pgsql.exe program provided with ...
5
votes
1answer
2k views

Loading a raster using QGIS into a PostGIS2.0 enabled database

Following on from my attempt to install a postgresql 9.1 db with postgis 2.0 on windows 7, I am trying to figure out how to load a raster. I have successfully loaded a shapefile, and am trying to do ...
0
votes
1answer
442 views

Unable to Make PostGIS 2.0 - file not found

I am struggling to get the latest trunk of PostGIS to install on a fresh Mac running Lion. I did install PostGIS 1.5.3-2 for Postgres 9.1 from [KyngChaos Mac OSX Installers][1]. This setup worked ...
7
votes
2answers
2k views

How to run two PostGIS versions in parallel on Windows?

I'm trying to understand how to install PostGIS2.0 on Windows7. The PostGIS site has the following suggestions: PostGIS Experimental Binaries PostGIS 2.0.0SVN Binaries with Raster, Topology ...