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

learn more… | top users | synonyms

2
votes
2answers
385 views

How to specify gdal_contour output format as postgresql table?

I want to generate contours with gdal_contour command. It generates an output as shapefile by default. I want this utility to output a postgresql (postgis) table. The documentation says there is a -f ...
20
votes
1answer
8k views

How to change the SRID of exisisting data in PostGIS?

While importing my shapefile data to PostGIS, I did not select the proper Projection. How do I now change the SRID of the data, without transforming the Coordinates?
6
votes
3answers
3k views

How can I transfer data from one PostGIS database to another?

I have quite a bit of GIS data in a old PostGIS Database (version "1.1.6") and I need to transfer it to another PostGIS Database ("POSTGIS="1.5.3"). I tried creating a backup and restoring that on ...
2
votes
1answer
447 views

Create WMS service from existing image tiles

I have image tiles (jpg image files with txt georeference info files; see picture) stored in catalog (about 12GB, size one image tile ~ 275*466 meters). It possible create WMS service of the tiles to ...
1
vote
1answer
801 views

How to install shp2pgsql-gui on Mac OSX Snow Leopard?

I am getting started with PostGIS. I am trying to understand how to install the plugin shp2pgsql-gui under Mac. Right now my 'Plugins' tab in pgAdminIII is blank... Thanks!
2
votes
0answers
201 views

Displaying text from dxf in Openlayers

I managed to import .dxf into Postgis table, and now have, among others, rows with Point geometries and values in text column (which corespodent with Label values from ACAD .dxf). What is the best ...
1
vote
0answers
794 views

searching GeoJSON features

After googling for many days and reading the OL documentation, I don't understand well how the filterToParams in OpenLayers.HTTP protocol should work, what I'm trying to do is to find and display the ...
1
vote
0answers
331 views

Why won't this PostGIS query display in QGIS

I am having trouble rendering the following PostGIS query in qgis1.803. SELECT s.musym, st_intersection(s.the_geom,f.the_geom) as geo, nextval('"soilsplittersequence"'::regclass) as k From ...
4
votes
1answer
252 views

How to reproduce Stamen's Toner PostGIS setup?

I'm trying to render Stamen's toner map with Landez which uses Mapnik. The style I'm rendering is from Stamen's toner project. I'm using the one which only renders labels (no lines). I imported the ...
7
votes
2answers
265 views

How do you treat partial 3d features in PostGIS?

We have features from survey data that contain partial 3d information. The most common example would be a 2D LineString representing a road, that contains elevation information in certain points ...
1
vote
2answers
138 views

st_intersection; What Im doing wrong?

Im trying to run this query : create TABLE data.agri_grc as select id, code_00, ST_Intersection(data.agri.geom,data.grc_bor.geom) as geom from data.agri; But im getting this error: ERROR: missing ...
1
vote
1answer
242 views

Problem with Pgrouting 1.5

Hi all and thanks in advance. I have Postgis 2.0.1 and PgRouting latest version. I'm using osm2pgrouting to import OpenStreetMap data everything goes ok the trouble is that I always get source and ...
2
votes
1answer
72 views

Update table using contains function

I have a table that containing placename regions and another table of roads. I have another table that containing centroid of both placename region and roads.The table structure of third table is ...
3
votes
1answer
2k views

How to take polygon centroid in Postgis

I have table with column name,Latitude and Longitude.I want to update this with polygon name and its centroid latitude longitude.I know there is a function in postgis st_centroid(geometry). But I want ...
7
votes
1answer
651 views

Is it possible to geocode street intersections using Nominatim?

Is it possible to geocode the location of a street intersection using Nominatim? Example geocode query Commonwealth Ave at Washington Street, Boston, MA Successful Geocode by Google ...
3
votes
1answer
105 views

Calculating from a location to another location (calculation must be on a line/road path)

I'm using QGIS. I'm new. I have a CSV file, with the source point (the_geom) and destination point (the_geom). I have a road network already imported into PostGIS with pgRouting, and I need to have ...
5
votes
1answer
793 views

How you can repair invalid topology errors within postgis?

I've imported the shapefile of corine land cover project to my postgis database and the select gid, ST_IsValidReason(geom) from gis.clc2000 where not ST_IsValid(geom); returns in every occasion ...
0
votes
1answer
2k views

How to export data from QGIS to display in Google Maps?

I'm exporting layers of a project for a quantum gis postgis table and visualizing the data in gmaps, but the coordinates are very wrong. is there any special way to export the quantum gis? postgres ...
-2
votes
1answer
524 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
290 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 ...
1
vote
0answers
67 views

Database has duplicate values after running pgrouting

I am a newbie with postgresql and sql statements so maybe it is a trivial question, I'm sorry for that. I am working on a postgis database and try to use the pgrouting function. My goal is to store ...
7
votes
3answers
401 views

Is there a paid service for accessing a PostGIS/OSM DB

I want to render a world map with mapnik and postgis, but do not want to set up my own DB, because the needed hardware and processing time for the OSM import make it nearly impossible for me. I just ...
3
votes
1answer
143 views

Proximity query approach

Let's say that I have two tables in PostGIS, tracks and cities, each table has two columns, in both cases the columns are called name and way, name is a string, way is a geometry. I want to retrieve ...
1
vote
4answers
651 views

How to find the center point of MULTILINESTRING?

How to find the center point of MULTILINESTRING, which lies on the multiline?
0
votes
0answers
314 views

I wanted a tutorial link to start with geoserver and Postgis for ASP.NET

I wanted a reference material for coding using C# in ASP.net with geoserver and Postgis. Please tell me reference material for the same. I have searched for several reference material but did not ...
0
votes
1answer
434 views

PostGIS Out of Memory during bulk insert

I am attempting to import OSM road data using an SQL file generated by OSM2PO. However I keep getting the following error: ERROR: out of memory SQL state: 53200 Detail: Failed on request ...
3
votes
3answers
205 views

For the non-IT savvy GIS person (not great w/ Linux & Apache) could someone suggest how to set up PostgreSQL, Geoserver, and ISS/Apache?

I've heard of GeoCommon as being an easy GIS solution, but I'd like to host the data locally for internal users. I know of a group called Open Geosuite - but the ongoing maintenance is something I'd ...
2
votes
1answer
2k views

Why does ST_Transform fail?

I got a postGIS error like this, ERROR: transform: couldn't project point (100.496 13.7118 0): latitude or longitude exceeded limits (-14) SELECT ...
1
vote
1answer
53 views

How to update constraints if the table name was changed?

I modified the name of a Table in postGIS. But the constraints contains old table name. How can I change the constraints? Please help me.
1
vote
2answers
2k views

How to offset point perpendicular to line direction in PostGIS

I have a postgis table of points, that are sitting on road centerlines (I've linear referenced them). And the second table with road centerlines themselves. The point table also has a field roadid and ...
1
vote
1answer
214 views

Why are Postgis sequences not automatically updating in QGIS?

I'm adding new features to a polygon datasets in QGIS. The data is held in PostGIS but when i have a look at the attribute table for the polygon the gid field is not automatically updating, the entry ...
1
vote
1answer
335 views

osm2pgsql import crashed!

I am currently importing a bz2 country file into PostgreSQL 9.1 database for Nominatim 2 using its setup.php that runs osm2pgsql. After processing the nodes. it seems to be stuck at a certain spot ...
9
votes
5answers
2k views

How can I update ogr2ogr to include the PostgreSQL driver?

I'm trying to use ogr2ogr to upload a shapefile to a remote PostGres installation. When I ran this command: celenius:~ celenius$ ogr2ogr -f PostgreSQL PG:"host=255.34.00.00 user=postgres dbname=mydb ...
1
vote
1answer
310 views

PgRouting Driving Distance crashing postgis server

I haven't used PgRouting much so I'm a little in the dark here. However, I am attempting a driving distance calculation like the one described by Underdark here. My SQL is identical, I have a ...
1
vote
0answers
124 views

How to export dxf of window view from postGis MasterMap layer

I have managed to get qgis to show my Mastermap data which is stored in a postGis database. It's national coverage so seems to take ages to load but that's another question. I basically want to ...
4
votes
2answers
1k views

Publish SQL Views from Postgres/Postgis to Geoserver

I've trying and reading how to publish a Postgres/Postgis View in Geoserver. I know that I can create an SQL View in Geoserver, but I'd like to define the View in Postgres, not in Geoserver. Does ...
2
votes
1answer
86 views

cannot reproject postgis in mapserver

I am trying to set up a wms server using point data in a postgis (v 1.5.1, pgsql v 8.4) database and mapserver (v 1.5.1) (I know these are not the most current versions of anything, but my server is ...
2
votes
2answers
655 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 ...
3
votes
0answers
187 views

How to estimate the average width of a sidewalk? [duplicate]

I have a table with two polygons representing urban block with and without the sidewalk: geomBlock and geomBlockWithSidewalk. On my city we can approximate the polygons of geomBlockWithSidewalk to a ...
6
votes
1answer
4k views

How to import KML file, with custom data, to Postgres/PostGIS database?

By custom, I don't mean a different structure of KML file, but in <description></description> section, I have data with HTML tags of this kind: <?xml version="1.0" ...
4
votes
1answer
443 views

Problem processing OSM file with osm2pgsql

I have an OSM file and when I want to import it in my PostGIS base using osm2pgsql, I get the following error: Processing: Node(130k 8.7k/s) Way(0k 0.00k/s) Relation(0 0.00/s)Assertion failed: ...
2
votes
2answers
934 views

Export from PostGIS to SpatiaLite?

My PostGIS database contains OSM data from my country. For transportation reasons I want to export a spatial view I created from that data to a SpatiaLite database. Is there any way to directly ...
8
votes
2answers
366 views

postgis, extrapolate a line

I'm trying to extrapolate from a line segment to find a point on the line but a 3rd of the way 'back', i.e. trying to find point new, given points A and B below: Given a line, I can interpolate it ...
5
votes
1answer
248 views

Calculating path sinuosity in postgis

Sinuosity is a fairly straightforward concept. How can this be calculated in postgis given a series of linestrings that represent the path?
0
votes
0answers
256 views

assign_vertex_id error

I am trying to test if pgrouting works fine or not. To do so I have created a table containing the following attributes. Columns: gid | length | the_geom | source | target Now my ...
0
votes
1answer
334 views

Do postgres 9.1, postgis 2.0 from stackbuilder and pgrouting 1.0.3. work together?

I am new to pgrouting and I would like to check if the version I have installed works fine with postgres and postgis. I have installed postgres 9.1, postgis 2.0 from stackbuilder and pgrouting 1.03. ...
2
votes
1answer
521 views

How to upgrade PostGIS in OSGEO-Live Xubuntu virtual machine?

I have downlaoded the OSGEO-Live 6.0 virtual machine running Linux Xubuntu. I have it running through VirtualBox on a Windows machine. It currently comes preinstalled with a lot of GIS software, ...
1
vote
1answer
185 views

Qgis mapserver - Can it use plugins you use in qgis desktop?

Im thinking about developing a small python plugin for qgis which would access postgis raster database and return data via ST_AsPNG() for example. But since i need this in my wms, would it be possible ...
3
votes
3answers
958 views

How to Calculate length of polyline geometry for several tables in PostGIS?

PostGIS database contains several geometry (polyline) tables (with names "D1_r", "D2_r", "D3_r"). I calculate length for one "postgis layer" use request: SELECT ...
1
vote
0answers
98 views

Is this pgRouting perfomance acceptable for my tiny server?

I'm testing pgrouting functions in a tiny server with 2GB of RAM and a dual core processor. I wrote a program that create client process and they connect to the server in a specific hour to perform a ...