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

learn more… | top users | synonyms

2
votes
2answers
600 views

Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix: rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from ...
0
votes
0answers
310 views

Why does QGIS not show my new geometry columns?

I am trying to connect a few PostGIS Tables to Quantum GIS. The problem is that the geometry columns QGIS is showing are not the ones from the PostGIS database. QGIS shows me some columns I used to ...
1
vote
1answer
176 views

cartodb: query for the points within a radio from another point - postgis

I've georreferenced a couple of points in a CartoDb table, so now I have a the_geom column of type point I'd like to get all the points that are x meters away from a certain x,y point. So far now, ...
0
votes
1answer
969 views

How to fix “Connection failed - Check settings and try again” when connecting to PostGIS?

I have Postgres running via Postgres.app on rails already and am trying to connect QGis to the database. PostGIS is working already. (questions already found online deal with this issue only) I do ...
0
votes
1answer
105 views

How to start WebGIS for broke people? [duplicate]

I want to make a web GIS system. I will be graduating in 3 months and have time on my hands before going for interviews. if i can build something then i can show it off in the interviews and hopefully ...
0
votes
1answer
501 views

How to upgrade PostGIS 2.0 to 2.1 on Windows 7?

PostGIS 2.1 was recently released and I would really like to upgrade from 2.0, but can't quite figure it out. I had previously installed PostgreSQL 9.2 and PostGIS 2.0 using StackBuilder. Running ...
1
vote
1answer
203 views

Three table postgres sql join query

I'm having trouble getting my SQL query to work with three tables. I'm new to SQL to I've already spent considerable time trying to understand the documentation and making some sense of it. I'm using ...
3
votes
1answer
410 views

Best way to visualize the PostGIS Raster in OpenLayers

I have been stuck by this problem for a long time. Several ways have already been tried, but none of them works as I was expecting. Here are the description of each of these method as well as the ...
4
votes
1answer
511 views

Merging partially overlapping polygons into a table in PostGIS

I have a couple of tables (three) with polygons (landuse coverage in this case). Within each table, there is no overlap, but between tables there might be a lot of overlap. I would like to combine ...
1
vote
3answers
146 views

PostGIS intersect on insert?

I have a large amount of point data that I have in CSV form. I am able to insert it all into a PostGIS table no problem. What I want to do though, is split the data up on insert into multiple separate ...
1
vote
1answer
204 views

Merging polygons for rendering with Geoserver

For my application, I need to merge the polygons of different records into one polygon, but only for the rendering (WMS Map). If it's not clear, here's the goal: a PostGIS table contains the buffers ...
2
votes
1answer
301 views

Points to paths

I have a set of lat/long points which represent positions along a set of paths (the points are generated by satellite collars on several animals that we are tracking), and I want to link the points ...
0
votes
0answers
127 views

Geonode's geoserver failing (generating 404's)

I'm working on a Geonode installation, and some days ago, it stopped working correctly. After restarting geoserver, it only would show 404 pages (on myhost.com/geoserver) HTTP ERROR: 404 ...
3
votes
2answers
5k views

Exporting shapefile to PostGIS database in QGIS

How do I export a vector shapefile to PostGIS database? I am asking what format I have to export it.
0
votes
0answers
79 views

How to avoid intersection in pgRouting

I'm a newbie in pgrouting. I want to create a web-app with routing function. I want to ask how to avoid a road intersection with pgRouting? For example, there are some traffic jams happened in several ...
0
votes
0answers
122 views

Polygon dynamic grid creation for a shape file

I have used QGIS Vector->ResearchTools-> Vector Grid to create a 1lat x 1 long grid for the landpolygon shape file (from osm). Now, I am interested in creating dynamic grid for the original ...
2
votes
1answer
2k views

spatial query st_contains postgis

This seems too simple to be asking this but I am really new to PostGIS/Postgres have been going around in circles with this. I am performing a really simple spatial query where I would like to make a ...
1
vote
1answer
72 views

MassGIS Data Layer & PostGIS lat/lon not finding correct gemos

I am using the MassGIS House District data layer with srid 26986. I then query for the geom containing the lat/lon 42.21, -71.5 which should give me Boston but I got nothing. So I used OpenJump to ...
4
votes
2answers
3k views

PostGIS Geometry Query returns “Error: Operation on mixed SRID geometries” only for certain values

I have PostGIS table with two geometry columns, both defined with SRID 4326. I can insert into the table without problem, using the following INSERT statement (where lng and lat are values passed in ...
1
vote
1answer
98 views

how to identify EPSG of any shapefile [duplicate]

I have a shape file, imported in PostgreSQL using PostGIS when this shape-file is published in Geo-server it didn't show any layer. I had used EPSG:4326..thanks
2
votes
0answers
163 views

Spatial Precision for Editing in Multiple GIS Clients

I have something I'd like to discuss, I'll try to explain it first, why it's important, and I'll explain how ArcGIS handles the issue, which I think is a good way to handle it. Finally I'd like to ...
0
votes
1answer
243 views

Polygon grid shape file for landmass

I am interested in generating a polygon grid shape file for the landmass of the world. What I have presently is two tables in postgreSQL. Table 1: Coastal area shapefile ...
1
vote
0answers
55 views

How do I make vectorlayer with sql on PostGis via python code

I need to make a vectorLayer and fill with the SQL's results on PostGIS via python code. I'm working with python 2.7, QGIS 1.8 and PyQt 4.5 How do I it ? thanks
1
vote
0answers
356 views

Loop though records in PostGIS (using PL/PYTHON or PGSQL)

I've seen many example of loops, but I can't get that one to work. I work for a regional transit agency and each year, we conduct several surveys. I geocode everything to the house level for internal ...
0
votes
1answer
34 views

What is the meaning of “MULTIPOLYGON EMPTY” Message?

I am trying to run ST_Intersection function. SELECT ST_AsText(ST_Intersection(ST_Point(42.729123082000058,-96.619302355999992), ST_Point(42.72899715300008,-96.619410439999967))) FROM clu_08aug; I am ...
3
votes
1answer
148 views

Strange exposure of a PostGIS layer in QGIS after importing OSM data into a database

I've imported a osm layer into my postgres/postgis database. osm2pqsql -E 3857 -c -S /usr/share/osm2pgsql/default.style -H localhost -W -d landslide -U postgres oberpfalz-latest.osm.bz2 During the ...
3
votes
1answer
2k views

PostGIS: Count number of vertices of lines and polygons in tables

I have 23 tables in a postsgis schema which I need to count the number of vertices of. The tables are a mixture of lines and polygons so realised I need to use ST_NPoints(geom) So I ran the following ...
0
votes
2answers
563 views

How to convert shp to PostGIS dump?

Given a file my_file.shp such those from Gadm e.g. US administrative divisions, where the coordinate reference system is latitude/longitude with WGS84 datum. Input could actually be: Shapefile, ...
0
votes
1answer
36 views

How to make a vectorlayer through of sentence SQL on PostGRES

How do I create a vectorlayer to through SQL on PostGiS on Python 2.7. I is working with QGIS 1.8 and I needed create a vectorLayer through SQL on PostGIS.
7
votes
5answers
1k views

Are there open source solutions for travel demand modelling?

I'm looking for open source tools for travel demand modelling (eg The four-step UTMS). Preferably in a GIS environment. That works well with Qgis, Grass and Postgis. My question is not related to ...
1
vote
0answers
520 views

save features from openlayers to postgis via nodejs and websockets

I try to save features created on a vector layer (openlayers) to postgreSQL 9.1/postGIS 2.0 via websockets. As server I use nodejs 0.10.12 along with the pg module I cannot fix it. Its getting so ...
0
votes
1answer
99 views

Multiple Rasters into PostGIS

This may have been asked before, but A) what software/libraries etc do I need to B) load multiple rasters into PostGIS? I have Python 2.7.5, QGIS 1.9 (latest Weekly Build), PostGIS (whatever the ...
1
vote
1answer
124 views

Spatial Aggregation of attributes from line structures in polygons

maybe someone has an idea how to deal with it (or directly knows the equivalent functions in PostGIS) for the following problem: I have a transport network (something like railways) and the ...
2
votes
2answers
335 views

nearest neighbor with postGIS and nodejs

I'm using postgreSQL 9.1 , postGIS 2.0, nodejs 0.10.12 and the latest version of node's pg module. I use websockets on the server side. I implemented a function that tries to find the 5 nearest ...
0
votes
2answers
534 views

How to create a MultiLineString feature with a postgis layer in QGIS

I have troubles handling with MultiLineStrings in QGIS. I added the table where I defined a column as geometry(MultiLineString, 31468) as a postgis layer in QGIS. Now I want to create features with ...
0
votes
1answer
355 views

Why won't OGR connect to my PostGIS database, but QGIS will?

Trying to connect to my PostGIS database with some success... One hiccup is that OGR will not connect to my server from a remote machine, though QGIS can connect to it just fine from that same ...
9
votes
4answers
788 views

How to use PostGIS to handle complex geoprocessing workflows?

Our organization is considering moving our geoprocessing workflow to PostGIS. We are currently using ArcGIS, with a plethora of custom Python tools used in ModelBuilder. We're moving most of our data ...
5
votes
1answer
266 views

Maritime route prediction avoiding land masses

I am working on a project where the following functions have to be implemented: Predicting the locations of the ships (in maritime environment) at a future time. (Can be done with Kalman filter, IMM ...
1
vote
1answer
89 views

st_intersects on postgis

I'm trying to write a command to see whether a given point lies within a multipolygon boundary (in this case, a watershed). I have a table of watershed boundaries and another table with the point I'm ...
2
votes
0answers
57 views

What is the MS SQL Spatial syntax for counting points within polygons? [duplicate]

All, What I'm trying to do is this: Count points within polygons There are thousands of points and maybe 2 dozen polygons Get a list back of the 2 dozen polygons by name and the count of points ...
0
votes
1answer
915 views

OS Vectormap GML files into PostGIS

I am having difficulty in efficiently dealing with OS Vectormap data that comes in GML format. In the past I used the Plugin for QGIS (OS GML Tools) to batch convert folders of compressed GML (.GZ) ...
1
vote
0answers
348 views

MapServer Clustering GetFeatureInfo

I'm having a bit of a problem with clustering in map server the clustering itself works fine and the GetFeatureInfo works fine most of the time. However some times when I click on a cluster point it ...
1
vote
2answers
2k views

How to select all points within a circle in PostGIS?

I have set of points in a PostGIS Table (Type Geometry). Now, I need to filter points that lie in a circle with a center (C) and radius (R)! I expect C to be of type Point or Coordinates.. R to be ...
5
votes
3answers
593 views

Very poor performance of QGIS and PostGIS2. User error or feature?

I have a large table in Postgis2. It has >500 million polygon, line and point features all happily living in there and the table performs brilliantly in other GIS. I am now trying to just add that ...
0
votes
0answers
259 views

How does geoserver determine what SRID to pass to PostGIS [OPERATION ON MIXED SRID GEOMETRIES]

We are using Geoserver to render some data onto maps in a web application. The map shapes are read by Geoserver from a postgis database. The shapes are imported into postgis using the ogr2ogr utility. ...
2
votes
1answer
85 views

Intersecting Layers Returns Empty Collection Despite Visible Intersection

When I perform an intersection of a polygon I draw in OpenLayers and a postgis database layer, it seems that I am getting incorrect results. Intersection works correctly on some layers. For ...
1
vote
1answer
499 views

How to render GPX files in TileMill?

I want to show a number of GPX files in a TileMill map. Here's the process that I thought would work: gpsbabel -i gpx -f "$myfile" -o kml,lines=1 -F "$myfile.kml" Add as layer in Tilemill, style ...
0
votes
3answers
221 views

What is gid in OpenStreetMap data model?

I'm using an old code written by an ex-fellow and I wonder what is GID in OSM? The gid is basically used everywhere. The project uses PostGIS and PgRouting. Any pointers to that? I know this is a ...
2
votes
0answers
133 views

Large buffers in PostGIS (5000 km radius)

I have a number of points stored as geographies in PostGIS (version 2.0.1), and I'd like to create rather large buffers around them (with a radius of 5000+ km). However, ST_Buffer doesn't handle this ...
1
vote
1answer
449 views

PostGIS package problem on Ubuntu 12.04.2 LTS

I've started getting an error on Ubuntu when trying to upgrade packages: "Not all updates can be installed Run a partial upgrade, to install as many upgrades as possible" When I run a partial ...