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

learn more… | top users | synonyms

1
vote
1answer
735 views

Having trouble connecting QGIS with postgres database with postgis extension

I am working on Ubuntu Precise with postgresql version 9.3 and postgis 2.0. After initially starting my postgres database and eventually getting permission errors that would prevent postgres from ...
0
votes
1answer
85 views

PostGIS select sites within buffer

I have a WMS query (GeoServer) that returns info from my layer into a popup in Leaflet.JS.However I was wondering how would do this outside of leaflet, i.e. on a standard html/php page. I assume I ...
3
votes
1answer
182 views

Snapping points to nearest road

I have a small table of 10 cities (in one table) that I am snapping to the nearest road (in another table) with the following select and storing the table snapped_cities: Select b.id, ...
2
votes
1answer
343 views

Getting Layer in WMS and Editing in WFS-T on OpenLayers [closed]

I have huge datasets on PostGIS. For example building table includes more than 100k features in POLYGON geometry. When i want to get all data in QGIS(2.1) or other GIS softwares by using direct DB ...
2
votes
3answers
1k views

Postgis shapefile loader 2.1 error: dbf file can not be opened

The .shp, .dbf and the rest of files are fine, I open them in QGIS, AGOL with no problem. In fact, I've tried 3 different layers, and get always the same error. Anyone can please help, as I really ...
1
vote
0answers
51 views

Selecting a rectangle box from a raster tiled table in PostGis 2.1

I am new to PostGIS as well as SQL queries for rasters. I have imported a raster .tif file into PostGIS with tiles. I would need to select a bounded rectangle from within this raster using SQL ...
0
votes
1answer
243 views

Creating PostGIS Geodatabase features in QGIS defaults to ST_Geometry

I have a PostGIS database that uses the PG_Geometry stored in a shape field. This same database is a registered ArcGIS geodatabase. I am able to edit and create features in ArcGIS. I can connect, view ...
8
votes
1answer
538 views

Materialized View Does Not Appear In Geometry_Columns View

I have defined a materialized view in a PostGIS 2.1-enabled database running PostgreSQL 9.3.1: CREATE MATERIALIZED VIEW canvec_data.contours_m AS SELECT contours_original.ogc_fid, ...
4
votes
3answers
172 views

how to make web mapping project run (serve map) faster

I'm implementing a project with openlayers 2.12, Geoserver 2.1.3 and PostgreSQL 9.1/PostGIS 2.0 I also use HTML5 Geolocation API and MapQuest's Geocoding API. In the database I have data (osm_line, ...
3
votes
1answer
109 views

Postgis 2.0 geographic polygon has max longitudinal range

My problem is that I have a load of geographic point data (srid 4326) in a table. A user may do a bounding box search - essentially create a polygon as follows: l_poly geography(Polygon,4326):= ...
2
votes
3answers
459 views

How to access qgis, postgis, etc in ubuntu through Amazon AWS

I'm new to programming; however i have been able to read and research the programs i need to set-up for a GIS system. I chose to use Geoserver (as WMS) Postgresql, postgis, Qgis and Openlayers. I am ...
2
votes
1answer
805 views

Problem with loading OSM planet into PostgreSQL

I try download OSM planet into PostgreSQL database. I do all steps from instruction http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/ I also modify string "kernel.shmmax" ...
2
votes
1answer
310 views

GeoWebCache seed task dies immediately after being submitted

The data comes from Geofabrik's Brazil slice: http://download.geofabrik.de/south-america/brazil.html Imported into a PostGIS DB with osm2pgsql. GeoServer is 2.4.0, running on latest Tomcat 7.0.x, on ...
1
vote
0answers
115 views

SQL procedure(s) to convert GPS traces to an ordered set of junctions in a network

I have three datasets that I have loaded into a geodatabase (spatialite or PostGIS): A set of GPS points collected from individual trips through urban areas. Points have a unique point id, a group ...
5
votes
1answer
148 views

Good projection for covering most of the world

I'm writing an application for building navigation routes thru the city streets, and not quite sure what projection would be best. I tried EPSG:3587, however, the tools I'm using - GeoTools and ...
3
votes
3answers
377 views

osm2pgsql --hstore

I'm working with postgreSQL 8.$ and PostGIS and I need to import osm file to database. I tried it with utility osm2pgsql, but I have problem with hstore extension. Does anyone know how to solve this ...
2
votes
2answers
314 views

ST_ShortestLine gives different results for 4326 and 900913 projections. Which is correct?

I'm trying to get my head around how ST_ShortestLine (and ST_Distance and ST_LineLocatePoint) work with different projections. The result for the shortest line differs depending on which projection I ...
2
votes
1answer
775 views

GeoTools and PostGIS with ESPG:3857

I'm trying to use both PostGIS and GeoTools with the same ESPG:3857 projection, however, it looks like the projections in PostGIS and GeoTools differ. This is what I have in PostGIS: PROJCS["WGS 84 ...
1
vote
1answer
292 views

PostGIS: Select FROM AS with WHERE not working

Maybe it's just because it's a Friday afternoon, but why can't I use the last WHERE in the following query? The ORDER BY works, but when I include the WHERE, I get an error saying "column line_geom ...
2
votes
1answer
613 views

How do I upgrade from PostGIS 2.0 to 2.1?

I'm using homebrew on OSX. I have a working postgres 9.2 + postgis 2.0 database installed. The main problem is that the 9.2 dump contains all the postgis 2.0 tables and functions, which don't need to ...
3
votes
3answers
299 views

A linestring merger algorithm

I'd like to merge linestrings which touch, but do not cross. The linestrings share the same SRID and come from a PostgreSQL 9.2/PostGIS 1.5 database. Within the table I query are several line strings, ...
3
votes
0answers
78 views

Why are date vaules displaying a trailing 'Z' when layers are published with Geoserver and a PostGIS data store?

I have published various layers using Geoserver 2.2.x with a PostGIS 2.0.1 (PostgreSQL 9.1.x) data store. Fields that only have date values and not time/timestamp related values are stored as date. ...
6
votes
1answer
76 views

Geoserver and PostGis output [closed]

I have a peculiar rendering of a small table in PostGis of polygones (imported from a shape file) from Geoserver (layer preview with OpenLayers) The object are just cloned ... Would you give me a ...
3
votes
1answer
422 views

How to join 2D polylines and DEM into 3D polylines?

I got a simple question but could not find a satisfactory answer yet: I have a road network in 2D/PostGIS and a DEM. I want to turn the road network into 3D by retrieving the Z-value from the DEM. ...
2
votes
0answers
232 views

Smoothing Lines in PostGIS

I want to smooth Lines in postgis, to be more specific, I want to smooth road data from OpenStreetMap. Basicly I thought of something like this scenario. This would be a possible road segment. I ...
0
votes
2answers
190 views

Convert the_geom to text and then transform

I have this query that returns the_geom as text. However how could I also apply a transform to the same query. I can do this separately with the second example. Though I would like to do this to all ...
3
votes
1answer
116 views

Routing problem finding shortest route to line

inspiration on how to solve this problem. (Ascii art, I don't have points to insert picture) I need to find Z Z = Shortest route from X Using Road (no point exists here) O = The points that makes ...
0
votes
1answer
337 views

PHP/MySQL, PostgreSQL spatial queries. Find a polygon that contains a coordinate? [closed]

I am building a non mapping javascript app and I am wanting to take a lat/long coordinate and query a MySQL table of polygons for the one that contains the point. I have looked into MySQL spatial ...
8
votes
2answers
179 views

Feeder bus service

First of all, a little background. I work for a regional transit agency. We are making a "diagnostic" about our feeder bus service. We'd like to know what proportion of our users could take the bus ...
3
votes
0answers
83 views

Add attribute table to a raster in postGIS

I would like to add attributes to a raster stored in a postgis database. I use the following command to insert the raster in the database: raster2pgsql -s 4236 -I -C -M ...
2
votes
0answers
47 views

Update PG table setting an area_id

I have a table with lots of points which I'd like to update and set a consecutive area_id to every point "group". I define a point "group" as points that are within a 500 meters radius. The raw table ...
4
votes
3answers
283 views

How to create non-overlapping street polygons from centerlines?

I want to create non-overlapping polygon layer from center line by applying the buffer to line layer in postgis. I am able to create polygon layer but how to avoid or resolve overlapped polygons. ...
2
votes
1answer
191 views

Fast zipcode detection from latitude/longitude

I need a way to get the zipcode of a lat/long pair fast (<10 ms), and at a high rate (thousands of qps) I've loaded a shapefile from the US Census Bureau into a mysql database with spatial ...
2
votes
0answers
35 views

Geoserver Feature Versioning Support

I am creating a map feature editor that supports versioning & rollback using Geoserver as the WFS. From what I've read online, it seems Geoserver supports feature versioning. My question is how ...
3
votes
3answers
940 views

Best way to assign points to nearest roads in postgis?

I'm trying to implement a simplified type of dasymetric mapping for census data. I've downloaded the Census's American Community Survey individual-level data and randomly assigned every household to a ...
0
votes
1answer
130 views

Is there a way to run st_split from within QGIS?

Is there a way to run st_split from within QGIS? I am looking to split a polygon with a line feature. My data is stored in a PostGIS database, and I would like to perform this operation from within ...
1
vote
1answer
157 views

How can I add a delete button to feature forms?

I have created some formulars in QTDesigner for capturing and manipulating data in QGIS. The data is stored in a postgis-database. It would be helpful to have a delete-button in this formulars to ...
1
vote
0answers
45 views

Upgrade Postgres/Postgis

I have Postgres 8.4 and postgis 1.5.3 installed on centos6. Now I need to upgrade both to postgres 9.x and postgis 2.x. Is there somewhere a good tutorial how to upgrade without removing the old ...
0
votes
0answers
103 views

Postgis template1 database missing

I want to create a template_postgis for connecting postgis via qgis So I follow the step on following page how to create a new postgis database for usage with QGIS under windows But when I follow ...
2
votes
0answers
305 views

Migrating from PostGIS to Oracle Spatial

We are now using a solution based on PostGIS extension of Postgresql database for various spatial queries. But we are now thinking about data security. This is why we have a plan to migrate existing ...
2
votes
1answer
237 views

PostGIS 2.0 function returns pseudo-type record rather than table

I'm writing a PL/pgSQL function to take a geography column and output a fishnet that bounds the extent of the shapes. I've tried to emulate the examples in docs and tutorials, but the function ...
0
votes
1answer
213 views

Can I use GeoTools with Gradle?

I am going to implement shapefile uploading from a webform, and ingestion into PostGIS. One problem I am having is that my project is using Gradle for dependency management. I am unfamiliar with ...
2
votes
1answer
107 views

How to split polygons with another polygon and inheritage data?

Let's say that we have two tables with polygons representing areas. Table A and Table B. Geometries from table A represents both the valid and invalid areas. And the geometries in table B represents ...
-1
votes
1answer
27 views

The command for find the object

I got error message that shows "Object has more than 1 line in polyline". What is the command to find the object that has more than one line (such as error on number 100) Thank you
1
vote
1answer
185 views

Why can't I connect to my new local PostGIS database?

I'm trying to connect to local PostGIS instance (PostgreSQL.app on mac) with QGIS 2.0, and it gives general connection errors. Connection with same parameters with other clients (psql, PGAdmin) is ok, ...
1
vote
1answer
130 views

Computing altitude from contour table - slow ST_Dwithin query

I am using PostgreSQL 9.2/PostGIS 2.0. I have a table of house addresses and a table of contour lines which are as follows: address_list house_id | geom (point, 4283) ---------+--------- 1 | ...
2
votes
1answer
439 views

Create isochrone from multiple start points

I want to create an isochrone. For this I could use the pgr_drivingDistance function with pgRouting (http://docs.pgrouting.org/dev/src/driving_distance/doc/index.html) but it only takes one start ...
2
votes
3answers
361 views

Best Approach to display charts on a web map?

I have a very basic understanding of GIS through some basic work with openlayers in Drupal CMS. I am trying to understand what is the best approach to display a chart on a map (like the one below)? I ...
0
votes
1answer
233 views

ST_GeomFromText in Where Clause SQL

Can I use ST_Geom_from_Text in a where clause? Specifically: Select column from schema.table where ST_DWithin( ST_GeomFromText('POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 ...
1
vote
1answer
297 views

Intersection of multi-polygons in postgis

How can I get the intersection of 3 multi-polygons in postgis? I have three geometry collection and I want a fourth with the result of intersection of the other three. ...