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

learn more… | top users | synonyms

2
votes
1answer
237 views

Force dimensionality with shp2pgsql

After invoking: shp2pgsql -W "latin1" theshape.shp > thesql.sql My console responds with: Shapefile type: PolygonZ Postgis type: MULTIPOLYGON[2] Note the shapefile type is PolygonZ. The result ...
0
votes
1answer
81 views

Schema for offline map editing and pass to production environment

I'm working with QuantumGIs and PostgreSQL/Postgis. So when I edit the layers, the changes are reflected on the DB. The thing is I want to do some "offline" editing before committing the changes to ...
2
votes
1answer
167 views

Get Multiple Shortest Path using PgRouting in One Query

I am trying to get multiple shortest path using A* Algorithm available in PgRouting. I referred Solution given by UnderDark ( Link of the Stakoverflow Post ) . But it is not giving me proper Output. ...
1
vote
1answer
56 views

What is the best way to construct a SQL query that returns the block name for each bus point as it travels?

I have two datasets in postgres; 1) a bunch of points that represent bus locations 2) city block polygons. Each bus has a unique ID and each block polygon has a field that has the block name in it. ...
1
vote
1answer
98 views

OpenLayers - possible to display detailed GIS data?

I have an OpenLayers app to plot point features, but need to read in a very detailed multipolygon vector layer to plot an accurate location. I'm currently loading the polygon layer via TinyOWS. I've ...
2
votes
1answer
81 views

Recommended way for changing value in PostGIS using GeoServer

I have a map being rendered from PostGIS using GeoServer. I frequently make some edits to the map and update the new value by directly connecting to the PostGIS database and then making the changes ...
1
vote
1answer
120 views

Difference in raster size using raster2pgsql

I use the PostGIS-build-in raster2pgsql to load SAGA-raster into the db. I tried to grid them into 100x100-tiles, just as seen in the code: /usr/lib/postgresql/9.2/bin/raster2pgsql -s 32632 -a -F ...
-1
votes
1answer
113 views

Shp2pgsql - exec() not allowed on external server

Me and my collegue are using the shp2pgsql and psql commands in php code (a Drupal module to be precise). We put these commands in a php variable and use the exec() command to execute them. This ...
2
votes
2answers
152 views

merging layer stored in PostGIS

I have a bunch of layers stored in PostGIS that I want to merge. I have spent quite some time investigating various approaches but I ket tripping over getting the GIDs to update properly. In the end ...
5
votes
2answers
842 views

GeoServer: Shapefile or PostGIS?

I'm going to build a web application, which will render around ten maps using GeoServer. I will be also changing the attribute data in the application for some layers. So, what is the recommended ...
8
votes
3answers
736 views

Howto setup and use a remote GIS workstation (QGIS,GRASS,PostGIS)?

I'm using QGIS (and sometimes GRASS and PostGIS) on my 2009 MacBookPro for my thesis project. I was wondering (during an endless batch generalizing in QGIS) if I can set up a server so I can work from ...
6
votes
1answer
188 views

Assigning costs to a road network : use raster or vector?

I have a road network in a PostGis database (db_routing). In another database (db_environment), I have some spatial features of the surrounding environment (trees as points and water bodies as ...
9
votes
1answer
269 views

How to find the buildings (polygons) a user can see from a given location (point) and orientation (angle range)?

I would like to retrieve the set of buildings I can see from a given location (point -lat,lng) and orientation (interval of angles) + certainly with a given depth (e.g. 100 meters). Ideally I would ...
3
votes
0answers
305 views

Extracting x,y,z values from a postgis linestring to python using ogr

I am trying to load a postgis linestring into python (using ST_DumpPoints) and extracting x,y,z coordinates, which is working but extremely slow..and if i mean slow, i really mean it (yes, it takes ...
1
vote
0answers
239 views

Can I use RGeo::Point data in PostGIS queries without multiple conversion?

How can I represent RGeo::Point ( CAPI implementation ) in some way where I don't have to convert it once more in Sql? Now I have something like this: class Poly scope :enclosing ->(geom) do ...
0
votes
1answer
264 views

tinyows failing to connect to postgresql - Ident authentication failed for user “postgres”

I'm getting the above error on a new and local tinyows installation on Centos 6. Postgresql 9.2, PostGIS 2.0. I can connect to PostGreSQL locally and from my LAN using several other methods (psql, ...
0
votes
2answers
122 views

Query for Creating a buffer around a particular point

I am working on a project for ambulance management using GIS. using Qgis,Postgresql,Postgis I am finding it difficult querying using St_dwithin as well as St_buffer. My aim is to find any hospitals ...
2
votes
1answer
177 views

Cannot find my schemas in QGIS's “Add PostGIS layers”

When I connect to my PostGIS database using QGIS's Add PostGIS Layers, I see only public topology pg_catalog information_schema My other schemas that I have created are not shown here. Anyone else ...
2
votes
0answers
106 views

Storing features in PostGIS and then creating layers using queries

I have a whole set of line segments or tracks that represent real tracks or, in some case, boundaries between areas. These segments form a network of lines on the map. I have a number of GIS layers, ...
4
votes
2answers
359 views

PostGIS retrieve polygons within a rectangle

I am building a system to bring in shapefile data from a PostGIS database and render it on top of OpenStreetMap tiles using the Leaflet.js library. My table (sierra_county_parcels) has a polygon ...
3
votes
1answer
228 views

raster tile - find the correct tile for a given coordinate

I have a large raster map which I loaded into postgis with 1000x1000 meter tiles... the corresponding table has about 200 rows, each row representing a tile. I want to get the raster value for a ...
4
votes
1answer
683 views

How to Find points in a Kilometre radius

I am new to PostGIS and GeoData. I need to find where the lightning has stroke by a period of time and kilometre radius based on a given location. I have given lon/lat and my table is: latitude ...
3
votes
2answers
1k views

osm2pgsql Error: operator class “gist_geometry_ops” does not exist for access method “gist”

When using osm2pgsql to import massachusetts-latest.osm.bz2 into PostGIS 2.0.1 database osm (running on PostgreSQL 9.1 on an Ubuntu 12.04), I get the error failed: ERROR: operator class ...
1
vote
0answers
62 views

New geographical point won't show on map

I did recently ask a question about how to add a new point to a PostGIS table. Now when I've got the new point in the table it should be visible on my map, but it isn't. I'm using Mapnik together ...
8
votes
2answers
1k views

Huge point cloud laser data in PostGIS - Storing and Processing it

I wonder, how it's possible to store huge sets of laser scanned point cloud data in PostGIS, with the time-aspect for processing it in mind. I know, there exists a geometry-object Point in PostGIS. ...
3
votes
2answers
1k views

Get Lon Lat values from a GEOGRAPHY data type in PostGIS

After storing lon lat values as a GEOGRAPHY data type, how do I retrieve the individual lat lon values? Failed attempt: SELECT id, geog, ST_X(geog), ST_Y(geog) FROM locations; Error: No function ...
1
vote
0answers
94 views

calculating st_simplify tolerance for openlayers

I want to display a vector layer in openlayers. Users can scale the map before they load the vector layer and I'd like to simplify the geometry with st_simplify before sending it to the client. Does ...
1
vote
3answers
766 views

What format is lat/long stored in OSM PostGIS?

Question: How do I to get the lat, long for all the toll booths stored in OSM for Virginia? Current Query: > gis=# select * from planet_osm_nodes where ('toll_booth' = ANY(tags)); id ...
0
votes
1answer
434 views

Unable to load Shapefile using pgShapeloader / shp2pgsql-gui (pgAdmin3's PostGIS Shapefile Import/Export Tool)

I am trying to load a shapefile (http://dds.cr.usgs.gov/pub/data/nationalatlas/statesp020_nt00032.tar.gz) into PostGIS 2.0.1 using pgAdmin3's PostGIS Shapefile Import/Export Tool. However its not ...
1
vote
0answers
37 views

Determining the SRID of a dataset in PostGIS [duplicate]

Sometimes the dataset provides some information about its projection. For example, it can mention Horizontal_Datum_Name: North American Datum of 1983, Ellipsoid_Name: GRS1980, ...
0
votes
1answer
158 views

Openlayers Linestring over edge of map

im trying to create a route displayer for ships. But im struggling with the edges of the map. When going from ie. 179* to 2* it displays a line across the entire map, instead of displaying it on the ...
2
votes
1answer
205 views

How to sum values of points inside polygons?

I have a polygon layer of territory and point layer with values from measurements. I must to add sum values from points layer to polygon layer . How to do this in PostGIS? Supplemented: Point layer ...
0
votes
1answer
166 views

Finding route contains Source and Destination points

I have a problem with finding routes that are near (in range X km) the passed points (for e.x. A and B) in PostgreSQL PostGIS. Example: The point A denotes Source point and The point B denotes the ...
0
votes
1answer
112 views

problems about setting pgrouting with QGIS under windows

I followed this website:A Beginner’s Guide to pgRouting and now facing some problems. I finished steps before "Creating a routable road network", and open QGIS 1.8, click the PostGIS Manager plugin, ...
1
vote
1answer
591 views

How to split line layer at polygons' boundary of a polygon layer?

I have a line layer and a polygon layer in PostgreSQL 9.2, PostGIS 2.0. How can I split every line each time it crosses a polygon's boundary?
0
votes
1answer
106 views

How do I get the closest distance for each element within a point coordinate table from a polyline table?

Postgres: How do I get the closest distance for each element within a point coordinate table from a polyline table? And if this is possible what version of Postgres is this doable.
2
votes
2answers
1k views

What Spatial Reference System do I store Google Map's Lat/Lng in

I am new to PostGIS, Spatial Reference Systems and projections and want to store lat/lng coordinates retrieved from Google Maps and Openstreetmap and its services like the Geocoder/Nominatim. I'm ...
0
votes
1answer
334 views

What Spatial Reference System do I store Google Map's Lat/Lng in [duplicate]

I am new to PostGIS, Spatial Reference Systems and projections and want to store lat/lng coordinates retrieved from Google Maps and its services like the Geocoder. I'm working with data in America and ...
1
vote
2answers
84 views

Where can I get public transportation locations for USA

I am trying to find a list of all public transportation/transit locations like subway stations, airports, bus terminals and bus stops for USA. Only major transit locations are required, rural bus ...
3
votes
2answers
604 views

How to perform SIA or Bezier line smoothing in PostGIS?

Can anyone provide an example SQL for smoothing linestrings from postgis table using Bezier curves or Iterative Averaging (SIA) algorithm?
1
vote
1answer
103 views

Diff operation in PostGIS/Geotools

What is the best way to perform a diff operation on Postgis features/tables or Geotools objects? Are there any automatic methods I can use? If not, what would be the optimal way to implement your own ...
0
votes
1answer
333 views

ST_Box2D in PostGIS 2.0

I am getting an error trying to create a bounding box of a geometry using ST_Box2D(). Is the function deprecated? If so, what is the equivalent function? SELECT ST_Box2D(ST_GeomFromText('LINESTRING(1 ...
2
votes
1answer
144 views

Value at a particular spot on Geoserver Heatmap

Geoserver is drawing from a PostGIS database to generate a heatmap using this SLD extension. Leaflet then overlays the heatmap over the base layer. Question: How can you determine the value at a ...
0
votes
2answers
119 views

Manually add a new point to PostGIS table [duplicate]

I did accidently delete a table row - or well, in fact a whole subway station. My attempt to solve the problem was this PostGIS function: ST_GeomFromText('POINT(coordinates)') But then PostgreSQL ...
8
votes
1answer
771 views

Generating Heatmap from PostGIS

I have GIS data in a PostGIS data base and would like to generate a density map and display them on a Leaflet/Google Maps. Question: What is the recommended/typical method for doing so, without ...
3
votes
2answers
231 views

Need help assigning values to field using OGR in python

I've got a similar question to this one How to programatically populate a shapefile field with polygon areas in OGR?, but the solution doesn't seem to be working for me. I am trying to import a ...
2
votes
1answer
584 views

How to get the coastline from OSM?

I've successfully imported all data for Sweden to my PostGIS database. Right now I'm designing my map in Tilemill with OSM Bright as base. But I've got a major problem: where is the coastline? Right ...
2
votes
1answer
214 views

ST_Equals Postgis problems

I am trying to find overlapping lines using ST_EQUALS on two tables This query returns 0 rows: SELECT * FROM geom1 c, geom2 h WHERE st_equals(c.simple_geom, h.simple_geom); This query runs ...
3
votes
0answers
166 views

Where can I find PostGIS error codes?

Using ST_Contains in where clause sometimes gives me error messages like ERROR: GEOSContains: TopologyException: side location conflict at 37.3706 55.7882 For now I can't guarantee validity for ...
3
votes
2answers
301 views

Postgis: aggregate function for intersection

I have a PostGIS Table with LINESTRINGS. I like to a query that returns all Roads that are connected. So I get a set of unconnected trees (in german 'Wald (Graphentheorie)') pseudo code: select ...