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

learn more… | top users | synonyms

12
votes
0answers
263 views

Frequency of overlapping isochrones with map algebra in PostGIS

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 ...
7
votes
0answers
175 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 ...
7
votes
0answers
125 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 ...
7
votes
0answers
197 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, ...
6
votes
0answers
165 views

Spatial query too slow to handle bigger OSM extracts

I'm trying to compute some statistics for OSM data using PostgreSQL 9.3.5 and PostGIS 2.1.4. I started with a small bavaria extract which I downloaded from Geofabrik. The db schema is the normal API ...
6
votes
0answers
139 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 ...
6
votes
0answers
770 views

How to use the linear referencing plugin from QGIS with postGIS data?

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 ...
6
votes
0answers
149 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 ...
5
votes
0answers
55 views

1-center and k-center problem / maxmin facility problem in Post

is there anybody who has already solved the 1- and k-center problem within PostGIS (optionally with distance metric obtained by pgrouting)? References: 1-center problem in Wikipedia and graph ...
5
votes
0answers
99 views

How to speed up simultaneous working with PostGIS layers in QGIS?

we are working on one big layer at the same time (10-20 people). Some of us use QGIS 2.8.1 and the other 2.6. The user with 2.8 have a lot of crashes (QGIS). The 2.6 users don't have this crashes but ...
5
votes
0answers
626 views

PostGIS: Merge any and all adjacent polygons

I would like to do adjacency tests on a parcel (polygons) layer and merge them if they fit certain criteria (could be size). Per the picture below, I would like to merge polygons 1,2,3 and 4, but not ...
5
votes
0answers
94 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 ...
5
votes
0answers
144 views

GeoServer ImageMosaic PostGIS index update

I use GeoServer where I created an ImageMosaic storage following this manual. When I create new datastore, all *.tif files are indexed into DB (PostgreSQL with PostGIS). How can I create new index in ...
5
votes
0answers
190 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 ...
5
votes
0answers
140 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. ...
5
votes
0answers
504 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 | ...
5
votes
0answers
486 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 ...
4
votes
0answers
41 views

Why won't my points (that I created by intersection) won't intersect with the geometry they've been created from?

I created a set of points by intersecting a linestring layer with the boundary of a multipolygon layer like this: CREATE TABLE freiraumkataster_grenze AS SELECT gid, ...
4
votes
0answers
30 views

Wrong coordinates after loading OSM to postgre

After loading OSM data for whole Europe to postgres (Osm2pgsql) I'm trying to add them to Geoserver, but the coordinates are totally wrong. The SRS is correct (4326), but the coordinate values are ...
4
votes
0answers
48 views

Tolerance in PostGIS

I am working with spatial data in land management using Oracle. The daily task is to perform spatial analysis: defining the mutual disposition of land plots borders, territorial areas etc. The ...
4
votes
0answers
57 views

Create polygon from lines in PostGIS

I'm trying to divide a polygon in smaller polygons from a line, but I think I can't use the st_split function. What I need is to create small polygons inside a big one, using linestring grid. I've ...
4
votes
0answers
489 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 ...
4
votes
0answers
439 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 ...
4
votes
0answers
245 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 ...
4
votes
0answers
667 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: ...
3
votes
0answers
32 views

Postgis sequence in QGIS not working

I have a Multipolygon-Layer stored in a Postgis-database. The primary key field 'gid' is SERIAL. When trying to add a new polygon in QGis (LYON 2.12.1 on OSX El Capitan), the attributes form shows me: ...
3
votes
0answers
57 views

Import Large Shapefile to Postgres

I'm trying to import a large dataset to Postgres, of about 600MB, that sits on a remote AWS server. But I get the following error Not enough memory to allocate requested memory (nRecords=26923892). ...
3
votes
0answers
24 views

Postgis - Construct linestring of length N

Give a table of linestrings (roads) ogc_fid, wkb_geometry And a road with ogc_fid = X In postgis how could I construct a linestring that is of length Y metres made up of roads starting from road ...
3
votes
0answers
30 views

How to get the geometries based on column values in postgis?

I have the following table in postgis I want to group the species along with geometries based on column values of 'val' i.e 11,11,11,11,11,11,11-corresponding species 6,6-corresponding ...
3
votes
0answers
28 views

How to quickly get coverage of multiple services at once using pgrouting driving distance

I'm trying to get some useful information out of openstreetmap data to choose where to rent an apartment in my city. I used osm2pgrouting and osm2pgsql to get OSM data into my postgis database. So far ...
3
votes
0answers
27 views

Mapnik: Parameterize queries for PostGIS datasource?

My datasource is PostGIS, but I need to build the query on the fly based on user-supplied filters. Obviously I don't want to create an SQLI vulnerability, so I'd like to parameterize my query, e.g., ...
3
votes
0answers
93 views

ERROR: PostGIS is already installed in schema 'public', uninstall it first

None of the threads in stack exchange related to this error helped me to resolve this issue. Hence I am posting it. I have installed postgres 9.3 and PostGIS 2.1 Now I have done the following su ...
3
votes
0answers
85 views

Dissolving polygons in a large dataset

I need to dissolve polygons by the ID attribute in a large dataset (+-1gb shapefile). I have been struggling to find an efficient method to do this. I have tried the following methods: Postgis ...
3
votes
0answers
35 views

Trilateration with error account or lack of precision

I am developing a node.js/javascript application where I would have dozens of beacons in a row (positions known), which gives me their distances to specific object (3 or 4 distances per object). The ...
3
votes
0answers
52 views

Problem with negative radius for ST_Buffer

I am very new to PostGis and I am trying to use negative radius of buffer for ST_Buffer function. The column is geometry(MultiPolygon, 4326) imported from a shapefile. Positive radius for ST_Buffer ...
3
votes
0answers
93 views

Visualizing variability in the size and shape of polygons

I am working with a data set of area restrictions imposed by criminal courts. These restrictions ban a person from entering a demarcated area. These restrictions vary in their size, shape, and ...
3
votes
0answers
348 views

Why are OGR (MySQL / PostGIS) connections extremely slow in QGIS 2.0 - 2.8 (when compared to QGIS 1.8)?

In our project we have been using QGIS 1.8 Lisboa with a MySQL database placed on a server accessed via local network since two years. Everything is working fine and quick. The vector layers can be ...
3
votes
0answers
418 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 ...
3
votes
0answers
77 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 ...
3
votes
0answers
557 views

Editing PostGIS data in ArcGIS Desktop?

Quick question regarding editing PostGIS data in ArcMap 10.0. Far as I can tell, this can only be accomplished through third-party plugins like GISSquirrel or ST-Links. Does anyone know of an ...
3
votes
0answers
491 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 ...
3
votes
0answers
827 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 ...
3
votes
0answers
324 views

Renaming Columns in Geotools FeatureType

I am attempting to build a simple java program that loads shapefiles into a Postgis 2.0 database. Everything is working out great except that I would like to be able to modify the FeatureType in the ...
3
votes
0answers
477 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
346 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
365 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
155 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
333 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
614 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
360 views

Can we do operations like Geo-referencing and Geo-coding in NoSQL Databses

I want to generate a map, using some spatial data provider like OSM. I am trying to put in some dynamic data-set on top of the base map. The data size is considerably large enough to be called as ...