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

learn more… | top users | synonyms

5
votes
0answers
53 views

How to extract sublinestring from a linestring with overlapping segments

Problem statement: Given a bus route (defined as a linestring ln.the_geom), and a set of bus stop locations (pt1.the_geom,pt2.the_geom,...ptn.the_geom), divide the bus route into segments between bus ...
4
votes
0answers
54 views

Vector to raster, then map algebra

I have a table of polygons representing travel time isochrones on particular days. For each origin point, there are five isochrone geometries (stored in separate rows). For each origin point, I want ...
4
votes
0answers
102 views

Focal Statistics for Special Neighborhood

I'm looking to calculate focal statistics for each cell of a raster, within a neighborhood of a specified criteria. Background - I have three binary rasters, each representing a single vegetation ...
4
votes
0answers
58 views

Point sampling along a pole-wrapping coastline with PostGIS

I am working on a task that requires me to get sample points every 1000KM along coastlines, and have run into a problem with Antarctica. From what I can tell, it seems to be an issue with the use of ...
4
votes
0answers
60 views

Compute visibility graph on sphere

I have a PostGIS table with some polygons (stored using the geography data type). They represent regions on a spherical earth. For each pair of vertices chosen from among all the polygons, I want to ...
4
votes
0answers
132 views

Find and destroy duplicate OSM multipolygon/polygons in TileMill/PostGIS

In OpenStreetMap there are sometimes multipolygons where attributes are present on both the polygon and the multipolygon relation, such as the Grampians National Park: ...
4
votes
0answers
228 views

How to create a topologically correct dataset in PostGIS (with GRASS)?

I have shapefiles which I have loaded in postgis and now i am trying to use geometric function in postgis like ST_intersect and they fail because the data is not topological correct. I have tried to ...
4
votes
0answers
128 views

Joining layers with respective elements with PostGIS Topology

Recently I have started using PostGIS topology extension, but I have some difficulties in understanding how the structure works: One of the key points is the use of "layer"s: as of what I understand, ...
4
votes
0answers
333 views

Geoserver WMS-T backend problems

I've been trying to set up a few timed WMS layers in GeoServer. They're simple enough, of the form ID(PRIMARY KEY) REGION DATE VALUE so for every region and date you have some value, e.g. the ...
3
votes
0answers
29 views

Prevent PostGIS Topology from splitting edges on line insert

I'm dealing with a large amount of road data represented with PostGIS Topology types. Anytime I add an edge over another edge, the edge is automatically split and a new node is created at the ...
3
votes
0answers
61 views

Most efficient way to intersect overlapping polylines

I have 4 multipart polyline shapefiles (download a sample dataset here). The geometries are identical, except for the length of segments in each shapefile. They represent 4 variables describing an ...
3
votes
0answers
51 views

Postgis database query optimisation

I have a set of rasters in DTED format which I load into postgis database using raster2pgsql command line tool. Each of rasters is simply stored in a row and described by rid and a value of raster ...
3
votes
0answers
52 views

Create a Shape file from Sql dump file

I am trying to map data by querying a table called xyz. I need to show the the_geom data on the map. I have below query in my mapserver .map file: DATA "the_geom from xyz using unique id using ...
3
votes
0answers
65 views

Intersection of a vector linestring and underlying DEM

Following is an screen-shot where ASTER DEM raster layer has been overlaid by a road linestring vector layer. I want to extract those DEM pixels which are lying exactly beneath the linestrings. I want ...
3
votes
0answers
68 views

Problem with performance when loading PostGIS layer using pyQGIS

I'm having a question on loading a PostGIS layer into the project from my QGIS plugin. The code is like this: uri1 = qgis.core.QgsDataSourceURI() uri1.setConnection(str(host), str(port), ...
3
votes
0answers
182 views

How to fix “Raster layer: Provider is not valid” error when loading PostGIS rasters?

I compiled and installed the current QGIS master as usual and I imported some raster data into my postgres 9.3 database with postgis 2.0.2 extension. Whenever I try to import the raster data into qgis ...
3
votes
0answers
91 views

How do I simplify the straight sections of (multi)Linestring in PostGres/PostGis leaving the curved sections untouched

I have (multi)linestrings containing upwards of 5000 points and I want to perform two simplifications possibly using Ramer Douglas Peucker or alternative methods in PostGis The (multi)linestrings ...
3
votes
0answers
196 views

Postgis - extrude a polygon

I want to extrude a polygon shape in postgis to create a pseudo 3D effect. To this end I have written a crude function to achieve it. This is very much test code and it creates a new Y vertice for ...
3
votes
0answers
337 views

Hibernate Spatial - 'Invalid endian flag value encountered' Exception

I'm trying to run a simple query in Hibernate Spatial 4.0 on PostgreSQL 9.3. I have a number of objects in a table with latitude/longitude values, and I'm trying to query objects that fall within a ...
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. ...
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 ...
3
votes
0answers
296 views

Finding poi using st_dwithin in postgis

I am not familiar with gis or writing sql, so my understanding in this field is lacking. I have a hundreds of lat/lng geographic coordinates stored in a single table called Places like this: ID | ...
3
votes
0answers
259 views

Find points that fall within a radius using Hibernate Spatial

I am using hibernate spatial and postgis and i want to find the points that fall within a certain radius. Using this SQL: SELECT name FROM institution WHERE ...
3
votes
0answers
339 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 ...
3
votes
0answers
186 views

building larger polygons from smaller ones *without* a common id in PostGIS

I am looking for a means, using PostGIS, of reconstituting a set of polygons from tens of thousands of smaller polygon 'pieces'. This is a simplified example, with the pieces shaded: Unfortunately ...
3
votes
0answers
312 views

How to import PostGIS layer with geography type to QGIS?

I tried to import in QGIS a layer from a PostgreSQL table with a geography type column created through the extension PostGIS. I noticed that QGIS doesn't seem to like the geography column... Here ...
3
votes
0answers
245 views

Creating Ellipse in WGS84, but with metric parameters

I have the function --Ellipse(x,y,rx,ry,rotation,#of segments in 1/4 of ellipse) SELECT ST_Translate( ST_Rotate( ST_Scale( ST_Buffer(ST_Point(0,0), 0.5, $6), $3, $4), $5), $1, $2) I have points in ...
3
votes
0answers
239 views

Is there a way to start the route on pgrouting from a coordinate that is not a node?

After execute all steps from this pgRouting tutorial, now I have a map that creates and displays routes, but as the routing methods rely on parameters representing vertex Ids that was created using ...
3
votes
0answers
140 views

Create a consistent topology using pgrouting

I'm developing an application that needs routing information for certain cities. First, I downloaded a openstreetmap datafile (*.osm) and then I imported it into a postgreSQL database using ...
3
votes
0answers
280 views

Shortest distance from pgrouting with cost not being length: optimal solution

I'm using pgrouting shortest_path_astar with a complicated cost function. It gives back the edges, vertices and costs. I would like to get the total distance of this shortest path (i.e., the sum of ...
3
votes
0answers
421 views

How to save table from PostgreSQL to MapInfo File?

I have two tables: 1 with geometry in WGS 2 with geometry in Local System I tried this: ogr2ogr -f "MapInfo File" output2.tab PG:"host=localhost user=postgres password=123456 dbname=postgis" -sql ...
3
votes
0answers
495 views

How can I properly add PostGIS data into MapGuide Maestro?

I am having trouble connecting a PostGIS database to MapGuide Maestro. Actually, I have added the PostGIS data into Maestro, but when I click to validate the layer it shows an error message: ...
2
votes
0answers
27 views

osm: relation tags to nodes

I filter an osm planet extract using osmfilter. I am only interested in nodes belonging to route=subway relations. After performing this operation, I use osm2psql to load all the data into my postgres ...
2
votes
0answers
30 views

filling the attributes according to intersection of two layers (Postgresql)

How to automatically fill attributes of a point layer according to the exact position in the polygon layer? I mean how to write a command in PostgreSQL to automatically fill the attributes by the ...
2
votes
0answers
13 views

What are the problems of loading overlapping (or the same) tifs into postgis?

I am still early on the Postgis learning curve. I have an existing table in Postgres - it looks like this: create table "public"."mytable" ( "rid" serial primary key, "rast" raster, "filename" ...
2
votes
0answers
53 views

Cartographic-complete Maps in PDF On Request using Open Source?

Currently I have some data in PostGIS. I want to implement the following: users will make a request via web, with parameters like location, scale, layers to be displayed, etc. and I need to provide ...
2
votes
0answers
22 views

postgres repojection: best practice

I have a postgres/postgis database. I would like to reproject those data coming to me in 4326 to 32736. For those tables with lat long info in wgs84 (4326) I have set the geom to 4326. Then I have ...
2
votes
0answers
64 views

Building a ol3 webapplication with dynamic content and user registration

My setup: currently i'm using a postgis database, get it with a geoserver and display it with openlayers 3. I use the wfs data to display the features in clusters and i'm able to edit them with wfs-t. ...
2
votes
0answers
74 views

Inserting coordinates from Google Maps into a Database

My question is pretty basic. I am using Android Google Maps to take the coordinates off a location on the map and I want to insert it into a PostgreSQL database. I know I have to use PostGIS but how ...
2
votes
0answers
29 views

Diminishing performance of gdal_polygonize in a python subprocess for GRASS to PostgreSQL

I have written a python script to polygonize GRASS rasters into a PostgreSQL database using the gdal utility gdal_polygonize: sub.call('gdal_polygonize.py -8 gdb/quercus/{0}/cellhd/{1} -f ...
2
votes
0answers
31 views

Why pgRouting GUI panel may not work in QGIS?

What could be the reason behind the mal-functionality of the pgRouting Layer GUI panel? In order to route shortest path via dijkstra function code I'm able to conduct the task using the following ...
2
votes
0answers
61 views

How to get user and password of a PostGIS layer

I wonder if it is possible to get the user and password for a PostGIS database if they are stored in the PostGis connection information. I get the connection information at the moment from the ...
2
votes
0answers
87 views

How to plot heatmap/locations in Geoserver & Openlayers map from the Lat/Lon data of PostGIS table?

I am using Geoserver, Openlayers, PostGIS for Geospatial web implemenation. I have an Indian map shape files for States, Districts, Talukas. I am able to generate a map with states, districts, ...
2
votes
0answers
47 views

OpenGeo: GeoExplorer cannot upload shapefiles into PostGIS

I have installed OpenGeo 4.1 on Ubuntu Linux 12.04 following the official instructions. I then followed the tutorial Load your data with GeoExplorer. I was able to zip and upload a few shapefiles. ...
2
votes
0answers
50 views

Rebuilding a Polygon from the points within it, in PostGIS

This question is an update on the problem formulated here. I wanted to redefine the border of a set of polygons, in order to "smooth it". My first approach (described in the former question) was to ...
2
votes
0answers
22 views

ArcGIS dissolve analysis output issues in geoserver wfs/ PostGIS

I have an ArcGIS dissolve analysis output (parcel data) that needs to be loaded on PostGIS and published as a wfs from geoserver. The issue is that the ArcGIS dissolve output shapefile, although can ...
2
votes
0answers
46 views

A* pgRouting issue with x1,y1 and x2,y2 values

I am trying to use the A* algorithm in a topology I have made in PostgreSQL. I can fill the x1,y1 and x2,y2 the latitude/longitude, but I have read that the same version has problems with ...
2
votes
0answers
61 views

QGIS There isn't entry in geometry_columns!

In PostgreSQL v9.3 with PostGIS v2.1 extensions I created a view from two tables (sites & visits). The site table contained a point geometry column (the_geom), which was included in the created ...
2
votes
0answers
101 views

N Nearest Neighbours efficiently PostGIS/Python

The data is worldwide about a million points, lat/lons, with an id and an importance value (0.0 to 1.0), and it's limited to being on land. Ideally I need to cluster all 1 million points into 100,000 ...
2
votes
0answers
74 views

Is it possible to create an ellipse around a line in 3D space?

In Postgis 2.1.1, I have a line in 3 dimensional space connecting two antenna points on the earth's surface. Is it possible to create an ellipse around that line? I have a formula to compute the ...