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

learn more… | top users | synonyms

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
521 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
288 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
400 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
649 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
313 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
432 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
334 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
308 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
651 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
440 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
933 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
365 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
246 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
519 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
953 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 ...
3
votes
2answers
2k views

How do I use st_dwithin with meters?

I am trying to follow PostGIS ST_Buffer Radius Help to use a 50 meter distance but postgis is returning an error. I am trying the following SQL, SELECT id FROM table WHERE ...
2
votes
2answers
2k views

PostGIS convert geography(Point,4326) to GPS

I got a database with a column of type geography(Point,4326), the data contained looks like 0101000020E610000092E057F66EF73140930035B56CBD4840. How can I convert it to GPS coordinates?
4
votes
1answer
184 views

ST_Intersects returns “incomplete” results

I've created a PostGIS database of bus stops and train stations (from the gtfs file of two transit authority -- CITLA is the bus and AMT_Trains is... well, the train). I've created a 200 meters ...
1
vote
2answers
2k views

How to display a image from Postgres database

I have Images in bytea form in PostgreSQL/PostGIS database, i want to display them in a webpage using PHP - PostgreSQL. I got lot of examples and I worked out but not getting output from them... Few ...
6
votes
6answers
1k views

How to calculate the maximum distance within a polygon in x-direction (east-west direction) in PostGIS?

I am interested in the maximum width of a polygon, e.g. a lake, in the east-west direction. Bounding boxes will help only in simple polygons but not in complex concave polygons.
3
votes
3answers
896 views

How to speed up Postgis raster layer display in QGIS?

i've been importing some digital orthophoto geotif files into postgis 2.0.1 via raster2pgsql tool (i also made 3 levels of an overview table - pyramid). Then i tried to import the layer into qgis via ...
5
votes
1answer
194 views

Given 2 LINESTRINGs with common point, how to extract common point?

I have 2 LINESTRING geometries. I know both share a common point. Using PostGIS for Postgres, what is the cleanest way to extract the common point? Example with illustration: How do I extract the ...
0
votes
1answer
306 views

How to get City, State, Numeration, etc from OSM roads by Geofabrik?

I'm really new in this GIS world. I downloaded a shp file from Geofabrik (http://download.geofabrik.de/osm/south-america/chile.shp.zip) and imported it to Postgresql using Postgis. If I see the road ...
1
vote
1answer
138 views

Creating admin roles with limited access to PostGIS

I'm trying to cram three different organisations into one server. Today they each have their own geoserver instance connected to separate PostGIS databases, which works fine. But now they also need to ...
2
votes
2answers
2k views

Is there a way to automatically populate attribute values in Qgis?

We are using a Qgis/PostGis combo, where Qgis is used for adding features with attributes into a PostGis database. Is there a way to automatically fill the attribute data values with some ...