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

learn more… | top users | synonyms

0
votes
1answer
262 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
105 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
357 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
222 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
676 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
92 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
756 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
432 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
203 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
163 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
584 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
982 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
332 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
594 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
331 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
768 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
230 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
581 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
213 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
300 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 ...
3
votes
1answer
146 views

Regenerate Geowebcache Tiles on PostGIS change

I am using Geoserver with Geocache to get WMS tiles and a PostGIS backend. There are 2 systems using the PostGIS database: one that is with Geoserver and one that is an old system that just uses the ...
0
votes
2answers
74 views

How to select by polygon in PostGIS with misaligned layers?

I have two polygon layers, one which defines subregions of the other. However, the layers do not line up exactly, so there are minor discrepancies along the edges. I would like to select all minor ...
1
vote
3answers
578 views

imposm: Failing to import OSM data to PostgreSQL

Somehow I can't import OSM data to my database. I'm using Debian, PostgreSQL 9.1 and PostGIS 1.5. The user root has been granted all privileges for the database osm. Input: imposm -U root -d osm -m ...
3
votes
1answer
376 views

PostGIS: Merge multiple table with same GID

I just imported some shapefiles with the PostGIS importer. Because several errors and issues I had to split my shapefile in multiple parts. Then I imported them one by one. I thought I can easily ...
2
votes
2answers
473 views

Create CMS system using Cartaro

The main objective for our project is to create a portal website in Drupal. On this website, people must be able to upload their geographical datasets (mostly shape files, but also xml files that ...
4
votes
1answer
79 views

Selecting surrounding states from a given state

I have a PostGIS spatial enabled table with the states in the US. How can I write a query selecting all touching states to a named state. Like this : Select * from States Where geom touches (Select ...
1
vote
0answers
259 views

View PostGIS geometry in QGIS

I am a newbie to GIS systems so please be patient. I have a PostGIS database set up with a spatial data table. One of the columns is of Geometry type and contains Points with SRID 4326. I want to ...
1
vote
1answer
552 views

pgsql2shp error when query is introduced

I'm trying to export a table from PostGIS using pgsql2shp. The basic query to export the entire table works fine using the following format: "C:\Program Files\PostgreSQL\9.1\bin\pgsql2shp.exe" -f ...
9
votes
2answers
4k views

How can I get a shapefile from a postgis query?

My data is in a PostGIS database. I would like to generate a shapefile from a query. How can I do that?
2
votes
2answers
146 views

Is there a way to visualize a convexhull in qgis 1.8 lisboa?

There is no way to visualize a convexhull in qgis 1.8 lisboa? I have tried following views in Postgis 1.5 I was told to use an id column to publish it in Qgis. If you not use an id column, u cannot ...
0
votes
0answers
136 views

QGIS cannot view raster loaded to PostGIS through raster2pgsql

I tried to load a raster GeoTIFF image to a PostGIS database using "raster2pgsql" following the OpenGeo Suite Manual. The command I used is: C:\>raster2pgsql -s 4283 -I -C -M "C:\Program ...
2
votes
1answer
87 views

How to create a buffer zone for notification

I am new to PostGIS. I am working on a project, for this i need to find out abutter notification that generates a list of properties within the buffer zone from the selected property with user input ...
4
votes
4answers
2k views

How to convert multipoint layer to point

I have a Spatialite layer which is multipoint (following a QGIS Save As from shapefile). I need it to be PostGIS and POINT. I have tried ogr2ogr -nlt POINT and got 'new row for relation "xxx" violates ...
2
votes
0answers
112 views

How to Create database using OGC compliant geometries and Custom type Geometries?

I am interested in storing geometry attributes in a PostGis database, so that it would be OGC compliant, along with OGC compliant geometry types like point,line, linestring, etc. I also wanted to ...
1
vote
1answer
327 views

Missing function ST_Extent in PostGIS db

I hope you can help as I am tearing my hair out here. Do any of you elite geo peeps have any idea why some specific functions could be missing from my PostGIS install? I am trying to use Mapnik with ...