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

learn more… | top users | synonyms

1
vote
1answer
206 views

Not seeing the actual data value in getObservation response from MapServer 6

I'm experimenting with MapServer and SOS but I'm not getting back any useful data from the GetObservation call I'm doing. My .map file uses a Postgres query to get data and when I run that same query ...
4
votes
1answer
1k views

Union, Dissolve, Buffer — multiple layers, all in one step?

I'm a new user of Quantum GIS (1.7.3) and I need to repeat a task multiple times, so I'm wondering if there is a quicker way to do the following (with three or more polygon layers - each layer has a ...
0
votes
1answer
217 views

identifying single overlaping features from a GeoServer layer

I'm trying to use GeoServer to display features from a PostGis table the url will look similar to this. Example URL ...
3
votes
1answer
409 views

making choropleth maps using PostGIS Windows

i read an article on chicago tribune blog about making maps, it consist on "making choropleth maps using PostGIS, TileMill, Mapnik and Google Maps" on Mac environnement, my question is how we can ...
0
votes
1answer
219 views

Running database operations against a stored GIS geometry

I'm using Quantum GIS and Postgres with the GIS extensions to store shapefiles that I'd like to run point in geometry and point in union geometries against. While it's easy to save and load the vector ...
0
votes
0answers
57 views

postgis minimum distance among many points [duplicate]

Possible Duplicate: Nearest Neighbor calculation in PostGIS Is there a way to achieve the following: SELECT ST_AsText(a.geometry), min(ST_Distance(ST_GeomFromText('POINT(10 20)'), ...
0
votes
0answers
38 views

Does Shooting star 1.05 not consider reverse_cost? [duplicate]

Possible Duplicate: PGRouting with 1.05 library in Postgres 9.1 Shooting star pgrouting lib 1.05 with postgres 9.1. Dijkstra and A-star working fine but "SHOOTING STAR" not considering ...
3
votes
2answers
2k views

How to implement feature search in OpenLayers with Geoserver?

I'm looking to build an application similar to this ArcGIS Server JS example which does a find task against a layer in the map. However i want to do this with OpenLayers, Geoserver and PostGIS. Some ...
14
votes
2answers
3k views

Identifying road intersections using PostGIS

I'm trying to identify where roads intersect each other, and to make a point at this intersection, with the number of roads that form the intersection listed. I was wondering if there was some way ...
1
vote
2answers
140 views

How to prevent base layers from being edited?

I've made a local tile server (mapnik + postgis + tilecache). Now i need to make use of some editing tool so that only newly created layer can be edited: users of this tool shouldn't have rights to ...
4
votes
2answers
844 views

Is Shooting Star broken in PGRouting 1.05?

I'm using pgrouting DLL 1.05 with postgresql 9.1. All required function installed. Astar and Dijkstra work fine with sample data but "SHOOTING STAR" is not considering "reverse_cost". Also if i try ...
5
votes
2answers
2k views

ogr2ogr kml to shp conversion created 184 shapefiles?! What am I missing?

I'm trying to convert this KML dataset of ice arenas to a shapefile using ogr2ogr (GDAL 1.8). After some initial troubleshooting to get the script running, it's creating 184 different shapefiles (736 ...
4
votes
1answer
186 views

Is it be possible to re-render parts of a tile pyramid when postgis table updates?

I have this idea of using postgis together with a tile renderer for serving my organization with tiled maps. As I believe my data will be partially altered almost on a daily basis it does feel like a ...
7
votes
1answer
1k views

Why do simplify polygon results differ between ArcGIS for Desktop and PostGIS?

I am mainly interested in why and how the Simplify Polygons tool in ArcGIS for Desktop handles the simplification process, including preventing and resolving topological errors better than the ...
2
votes
1answer
2k views

How to choose between Markers and Features for drawing Openlayers objects?

Yesterday I was trying to create first mock-ups of my GPS tracker interface, and was exploring the available OpenLayers objects for drawing on a map. I began with simple task - placing a marker on a ...
8
votes
1answer
2k views

How to perform a spatial join of point and polygon layers in PostGIS?

I have a point dataset representing households that I want to associate with a parcel layer (i.e. assign its parcel_id). With ArcMap, I could spatially join the polygons to the points and specify that ...
1
vote
0answers
177 views

I am getting a blank layer preview from geoserver after Quick Exporting my shapefile to postgis and then getting postgis to point to geoserver [closed]

What could be the potential problems? Looking at the layer's data fields/form the one thing that isn't filled is the Native SRS and its source, but I have already passed in the projection info as it ...
2
votes
2answers
160 views

After two buffers operations (+/-), why is the result file bigger than the original?

First file ( .shp ) had 1000KB, after 2buffers ( buffers on polygon, 1st buffer +100, 2nd buffer -100 ( small things near polygon should be removed )) in quantum gis file grown to 1500KB, and after ...
5
votes
2answers
3k views

Using OpenLayers (with OpenStreetMaps) and PostGis for rendering data acquired from GPS tracking device?

I'm researching and planing to acquire data from GPS device and store them in postGIS database, then use geodjango to process/work them out and finally chart them on a map with OpenLayers. Will these ...
3
votes
1answer
846 views

How to use the pgRouting TSP function?

For more than two days I'm trying to make the TSP algorithm work in PostgreSQL/PostGIS. My problem seems to occur when I'm trying to take into account the road network for TSP algorithm. I know that ...
9
votes
2answers
2k views

Is it possible to get the EPSG value from an OSR SpatialReference class using the OGR Python API?

When reading a layer from a OGR PostGIS connection I can get the SpatialReference of the layer, but is it possible to get the EPSG value? Is there any documentation on this? For example: lyr = ...
21
votes
3answers
4k views

How can I calculate the average width of a polygon?

I'm interested in examining the average width of a polygon that represents the road surface. I also have the road centerline as a vector (which is sometimes not exactly in the center). In this example ...
3
votes
3answers
842 views

How to route between lat/lon pairs in pgRouting?

I have set up Postgresql, PostGIS and pgrouting on Ubuntu. I have imported an osm for wales using the following command: ./osm2pgrouting -file wales.osm \ -conf ...
1
vote
1answer
509 views

Enhance performance of a join query for mapnik using postgis

I use mapnik to render map with datasources from a postgis database. One query is a join on two table, one with a geometry (a polygon) and the other one with some fields I want to use for rendering. ...
2
votes
1answer
241 views

PostgreSQL / PgRouting syntax error

My question is about Postgres/PgRouting syntax, when I wrote query like this: SELECT * FROM shortest_path('SELECT gid AS id, source::int4 AS source, target::int4 AS target, ...
4
votes
1answer
262 views

Spatial index vs two coordinates indexes

I have a table with two columns: latitude and longitude. I want to get all objects inside a "rectangular" (well, rectangular in a lat/lon coordinate metric) bounding box: min-max latitude and min-max ...
2
votes
5answers
4k views

What causes this unexpectedly poor GeoServer/PostGIS/OpenLayers performance?

I am having a tough time making this map run smoothly (play around with it for a bit, you'll see). I have taken a few tips from OSGeo's Making Maps Fast document, but I think there's another issue ...
1
vote
2answers
5k views

How to install PostGIS shp2pgsql-gui on CentOS 6?

I am installing PostGIS 1.5.3 on a CentOS 6.2 virtual machine to get started web mapping with Geoserver.I have successfully installed PostgreSQL 9.1, PostGIS 1.5.3 and PgAdminIII on the system. ...
3
votes
2answers
753 views

How to use pgRouting's dijkstra_sp_delta_directed with WHERE clause?

Right now I am using PgRouting for vehicle routing and I have problem with Dijkstra shortest path. My query is: SELECT * FROM shortest_path('SELECT gid AS id, source::int4 AS source, ...
5
votes
3answers
9k views

How to convert MultiLinestring to Linestring?

I have a multiline string and want to convert it to a linestring in order to use some functions that only work with linestrings. I used ST_Dump() and got a collection of my geometries. If I merge them ...
0
votes
1answer
237 views

Vertex point is returning None

I have this multilinestring that has 48 NPoints. When I execute ST_PointN(line,5) it returns none. And to continue on, it returns None for everything after index:2 up to index:48. This is how my line ...
5
votes
3answers
4k views

How to fix performance problem in PostGIS ST_Intersects?

I'm a newbie in postgis and I have a problem in query performance. This my query: SELECT DISTINCT ON (userid) userid ,ST_AsText(position), timestamp FROM table1 WHERE ST_Intersects ( ...
3
votes
1answer
777 views

How to detect overlapping linestrings in PostGIS?

I'm looking for the fastest way to detect whether a given linestring overlaps another linestring. (As reference, let's say my wife and I both go for a run and take different routes, I'd like to detect ...
2
votes
2answers
833 views

How to add a background map to a java project?

I'm new at GIS. I am trying to make a java application that can display a map with certain points. I have achieved this using the geotools library. However, I want to put the map from OpenStreetMap or ...
1
vote
1answer
449 views

Passing parameters to PostGIS SQL queries in Python: weird behaviour

The following code always goes to the except section and I do not understand why..Any help would be much appreciated. l = None c = conn.cursor() try: s = "SELECT ST_NPoints(ST_GeomFromText(%s))" ...
2
votes
1answer
859 views

Exporting PostgreSQL table to FileGDB: wkbUnknown layer geometry type

I'm attempting to export a PostGIS (1.5.3) database table as a File geodatabase using the new FileGDB OGR / GDAL 1.9.0 driver: $ ogr2ogr -overwrite -sql "SELECT * from db_pts LIMIT 1" \ -f ...
4
votes
1answer
1k views

How to assign OGR geometry a spatial reference when writing to a new layer using the Python API?

I'm using the Python OGR API to add new features to a PostGIS layer. However, despite setting the geometry spatial reference, when the geometry is written out the spatial reference is missing. This is ...
6
votes
1answer
5k views

Simple PostGIS ST_Distance query for two points from the same geometry table?

Note: This question was published at Stackoverflow at first. I have a geometry table points_table with SRID 4326 and a few points in it. I need to find a distance between a pair of points (features) ...
21
votes
4answers
17k views

Why does PostGIS installation not create a template_postgis

I went this route for installation of PostgreSQL and PostGIS: PostgreSQL using the standalone KyngChaos, PostGIS install from KyngChaos as well... pgAdmin3 from PostgreSQL Tools Now when I launch ...
2
votes
3answers
597 views

How to create a efficent linestring out of geography points using postgis

I'm trying to create a linestring out of geography points. At the moment I'm doing it like this: select ST_GeographyFromText(ST_Makeline(a.record_point)) from ( select (record_point::geometry) from ...
2
votes
1answer
885 views

JOSM vs QGIS/uDIG for road network editing and storage

My application needs to store a road network and provide editing functionality for that network (editing/updating/removing lanes, signs, traffic lights, speed limits info, etc.). I find JOSM tool to ...
1
vote
1answer
784 views

How do PostGIS layers in QGIS work?

I use QGIS 1.4.0 to import a layer which is basically a road network converted from an .osm file to a PostGIS database table by osm2pgrouting. I have skimmed through the documentation, but I am still ...
3
votes
2answers
752 views

Total great circle distance along a path of points (PostGIS)

I am looking for an SQL query that sums the distances between a series of points using PostGIS. The situation is as follows: I have 2 tables: tracks and points. Points belong to a track and thus ...
2
votes
1answer
402 views

A software architecture for viewing/editing roads and routes

I have a routing software module which uses PostGIS/pgRouting to calculate routes. The road network is generated from an .osm file with osm2pgrouting tool. I need to enhance the functionality of the ...
3
votes
1answer
847 views

clip linestring by length

Is there a way to clip a linestring based on distance? For example, linestring from a to b is 150 meters. I would like to get the linestring from a to a point that is is 75 meters away from a ...
3
votes
2answers
304 views

Postgis Grid Points on Boundary Issue

Hi all hoping someone can help me out with this issue. I've got a table of polygons which are grid squares which get overlayed on a map. These are used when querying data so that points get grouped ...
2
votes
1answer
479 views

The minimum bounding circle of geometry that crosses the 180th meridian

Background: I've been given a task where I have to calculate the minimum bounding circle of Alaska (for the purpose of running a Roeck test). I'm using the Census' state level geometries available ...
5
votes
2answers
581 views

Accessing non-spatial PostgreSQL tables using OGR Python bindings

When connecting to PostgreSQL/PostGIS using the OGR Python bindings is it possible to get non-spatial table names (i.e. OGR layers) from the connection? Currently, doing: conn = ogr.Open("PG: ...
5
votes
1answer
3k views

How to extract data for a specific area from OSM?

I need to extract all streets available on a particular area of a City. I'm able to extract all streets name using this query: select distinct P2.* from planet_osm_polygon P1, planet_osm_line P2 ...
1
vote
1answer
673 views

How to Run Ad Hoc Database Queries in Open Jump?

Which plugin allows you to run ad hoc queries from postgis in Openjump? How do you install it in Ubuntu?