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

learn more… | top users | synonyms

6
votes
0answers
290 views

What is the correct syntax for using gdal_rasterize with a PostGIS datasource

I have a multipolygon layer in PostGIS and I would like to use gdal_rasterize to generate a raster. I cannot find the correct syntax to specify PostGIS as the data source. $ gdal_rasterize -a ...
5
votes
0answers
652 views

How to create a routable road network from Ordnance Survey data?

I've been following the "Beginners Guide to pgRouting" in an attempt to create an in-house application that provides drive-time isochrones. I have a server, postgreSQL and PostGIS and pgRouting - no ...
3
votes
0answers
13 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 ...
3
votes
0answers
62 views

Editing PostGIS topology in a web browser

I am trying to conceptualize the best process for editing topology from PostGIS in a web browser. Ideally what I would like to accomplish is the loading of a topology (imagine the lower 48 states of ...
3
votes
0answers
47 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
149 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
105 views

PostGis functions vs. EWKT

While using PostGis, we can query using EWKT format like: SRID=4326;POINT(lon lat) or use the functions defined by PostGis itself. For example: ST_SetSRID( ST_MakePoint( lon , lat ) , 4326 ) I'm ...
3
votes
0answers
178 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 ...
3
votes
0answers
253 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
138 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
0answers
160 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
160 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
196 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
272 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
114 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
228 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
312 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
426 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
38 views

PostGIS does not export shortest path to Shapefile

I am trying to draw a bunch of lines overlaying the globe map in a WGS84 projection. To this effect I have created a PostGIS DB with a table that has one column containing linestring data. My problem ...
2
votes
0answers
29 views

PostgreSQL : Question about dropping tables inside funtions

I am writing a PostgreSQL code where I have a function wich is used multiple times in a single query with different input values. Inside the function I create some tables and use them. What is the ...
2
votes
0answers
25 views

How to set posgis default sequential value in a QGIS “editable” view?

Introduction In a QGIS project I have a VIEW, that I want to became editable (I'm trying to replicate the versioning system used DB Manager with some tweeks). Therefore I created a few rules to ...
2
votes
0answers
43 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 ...
2
votes
0answers
136 views

How to use the linear referencing plugin?

I need a guide how to use this plugin properly, I'm a newbie on PostGIS and I'm trying to use the linear referencing plugin of QGIS. I've created a database on postgreSQL with the postGIS extension ...
2
votes
0answers
89 views

Publish existing table from postgis to geoserver

I would like to know if there is any way for publishing existing table from postgis to geoserver using Geoserver REST API or geoserver-manager java implementation. The thing is that i'm actually ...
2
votes
0answers
104 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 ...
2
votes
0answers
159 views

import esri Personal Geodatabase (.mdb) to PostGIS

I would like to import an esri Personal Geodatabase (.mdb) to PostGIS. I have tried to follow the blog post: How to import esri Personal Geodatabase (.mdb) to PostGIS on Linux I installed the GDAL ...
2
votes
0answers
55 views

Is there an ArcGIS to PostGIS function cross-reference table?

I was looking back at the presentation called "PostGIS Tips for Power Users" by Paul Ramsey and got to thinking... Has anyone ever seen an ArcGIS Geoprocessing Tool to PostGIS function cross-reference ...
2
votes
0answers
46 views

Using ST_Affine() and trans_param() functions on vector layer

After reading this post How to georeference a vector layer with control points? I decided to give it a try to move/rotation/scale a polygon using Postgis. I have two polygons, polygon_from and ...
2
votes
0answers
143 views

Styling river charts with TileMill - issue with filling a polygon made of disjoint line segments

I am trying to style inland river charts produced by the Army Corps of Engineers. I imported the vectors into Postgres, and I’m using TileMill to style the data. I am having trouble correctly filling ...
2
votes
0answers
40 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 ...
2
votes
0answers
26 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 ...
2
votes
0answers
157 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
0answers
192 views

Smooth, not simplify, lines features in PostGIS

I'm trying to automatically generate paths to place labels on that follow the shape of rivers, 4wd tracks and other very windy lines. At first I thought the st_simplify() function was the answer, but ...
2
votes
0answers
86 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: ...
2
votes
0answers
40 views

Can't connect to WMS service? An Amazon-EC2 problem?

I'm running GeoServer 2.3.5 on a Windows instance in AWS for the first time. The data is on the server in PostGIS. The map layers have been published and I can see them locally without any problems. ...
2
votes
0answers
148 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 | ...
2
votes
0answers
118 views

Spatial Precision for Editing in Multiple GIS Clients

I have something I'd like to discuss, I'll try to explain it first, why it's important, and I'll explain how ArcGIS handles the issue, which I think is a good way to handle it. Finally I'd like to ...
2
votes
0answers
74 views

Large buffers in PostGIS (5000 km radius)

I have a number of points stored as geographies in PostGIS (version 2.0.1), and I'd like to create rather large buffers around them (with a radius of 5000+ km). However, ST_Buffer doesn't handle this ...
2
votes
0answers
168 views

3D features (Polyline, Polygon) intersection library

For my research I am looking for a (python) library to get the intersection of some 3D features. The features can be Polygons or Polylines. Mostly I need to intersect a plane with my features and get ...
2
votes
0answers
115 views

get all the possible parameters of sql view

I have a Geoserver layer coming from a postGIS database. Among other attributes, I have one that is related to the date data we've collected, called departuretime. We use this attribute to display a ...
2
votes
0answers
45 views

Optimize ST_CoveredBy performance

I have a PostGIS 2.0.3 table with 113,862 records with multipolygons represented both as geometry and geography. There is a gist index on each of them. I'm running the following queries: SELECT *, ...
2
votes
0answers
228 views

Geoserver - empty native SRS field

I'm converting layers from shape files to postgis with the below command: shp2pgsql -s 22175 -c -W "latin1" path/file.dbf' table_name db_name | psql -d db_name Next, I add this layer to the ...
2
votes
0answers
270 views

Clustering table on geohash index and geohash ordered table

I wonder if there could be a performance gain to re organize the rows in a table by Geohash and then CLUSTER this table on the Geohash index of the geometries. CREATE TEMPORARY TABLE tmptbl AS SELECT ...
2
votes
0answers
98 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, ...
2
votes
0answers
95 views

Installing knn on PostgreSQL for windows

I am trying to install the extension KNN for clustering as an extension on my PostgreSQL database. I have downloaded the file http://www.pgxn.org/tag/analysis I found instructions on how to ...
2
votes
0answers
22 views

Spatial overlay data from many lines into a single line

Hello I have joined lines in my data set into longer lines (based on similar attributes) to reduce the number of rows in my data set. Now I want to take the information from the original smaller lines ...
2
votes
0answers
134 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. ...
2
votes
0answers
102 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, ...
2
votes
0answers
101 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 ...
2
votes
0answers
33 views

Automatic insert of project name into database

For every layer I've a field in my postGIS database that should be filled with the name of the current project and today I do this manually. Is there a way to do this with the Commands that can be ...