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

learn more… | top users | synonyms

3
votes
0answers
344 views

Can't see Postgis layers added to QGIS

I'm trying to transition from an old Postgres/Postgis database to a new one. I'm working in a fresh install of Win 7 64 bit. I installed Postgresql 9.3 32 bit, then installed PostGIS 2.1.3. I created ...
3
votes
0answers
560 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
946 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
529 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
388 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
427 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
158 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
346 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
368 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 ...
2
votes
0answers
9 views

PostGIS - raster - bit operations

I have a raster data in the database in separate rows. I would like to select 2 rows and do a bit operation with them (like |, &) and store the result in memory as a query output. Is this possible?...
2
votes
0answers
35 views

How to count near intersecting polylines and merge them?

I have a dataset with several polylines created by GPS points of car trips. I am trying to create a simple heatmap where roads with more traffic (where polylines intersect) get darker. I already ...
2
votes
0answers
28 views

Kernel Density with vector output and/or possible automation?

I'm currently working on a project that will have me calculate the kernel density of a number of shapefiles with varying parameters. My current workflow goes like this: Import shapefiles in QGIS 2....
2
votes
0answers
14 views

ST_ColorMap wrongly loses 0.0 value when INTERPOLATE

I want apply a colormap to a monoband grey scale tiff from postgis calling ST_ColorMap. My query is something like "SELECT oid, lowrite(lo_open(oid, 131072), tiff) As num_bytes " + "FROM ( ...
2
votes
0answers
21 views

Issue loading PostGIS out-db rasters (either in QGIS or MapServer)

I'm playing with a few different options of storing raster data via PostGIS to visualize (eventually in a web app). The out-db or out-of-database storage seems the best option, but I can't seem to ...
2
votes
0answers
22 views

Using PostgreSQL stored procedure with GeoServer?

I was wondering if it is possible to call PostgreSQL stored functions from GeoServer? I tried to use GeoServer's WPS to do map algebra, but found that the operations it offered was somewhat limited ...
2
votes
0answers
40 views

QGIS, connect to postgresql using windows login credentials

How to connect QGIS to PostgreSQL/PostGIS using the Windows user login credentials (Windows / Active Directory / LDAP). Is it possible? Can anyone tell me how?
2
votes
0answers
27 views

WMS Layers from Azure Geoserver not loading with multiple users

I am loading multiple WMS layers into a leaflet web application from an Azure virtual machine Geoserver that pulls data from a PostGIS database on the same machine. The layers load through quickly ...
2
votes
0answers
50 views

QGIS : How to calculate centroid on polygons with holes

I try to compute the centroid of polygons with holes on qgis. I did not manage to do it directly, I had to make a conversion to convex hulls before extraction. I crashed my pgsql server trying to ...
2
votes
0answers
42 views

QGIS Road Graph export doesn’t work to layer postgis database

I have a layer of road and I calculate a shortest path with the road Graph plugin. I tried to export a shapefile, a sqlite database, a new temporary layer > I have no problem, the result is correct. ...
2
votes
0answers
30 views

Can't delete postgis

geo2=# create extension postgis; ERROR: PostGIS is already installed in schema 'public', uninstall it first geo2=# create extension postgis_topology; ERROR: required extension "postgis" is not ...
2
votes
0answers
64 views

How to get the area of a bounding box using PostGIS 2.2?

As someone who is doing a data integrity check of Geonames, I've found that about 10 percent of the data contain multiple sets of coordinates (longitude, latitude) for a place name within a country. ...
2
votes
0answers
116 views

PostGIS error while adding feature: no result buffer

Can anyone explain to me the following error and possible fixes? I am using QGIS 2.12.3 to connect to a PostgreSQL 9.5 database. What confuses me is that I was able to add a feature and save, but ...
2
votes
0answers
57 views

Qgis slow on loading project

Is there any work around to mitigate the amount of time QGIS takes when loading projects that have large tables from postgis layers . I have tried to turn off this large layers so they are not in use ,...
2
votes
0answers
49 views

How can I convert a shapefile from a single line segment to separate side segments using PostGIS?

I have a shapefile (STC) which is a single line segment per street with information for both the odd and even sides of the street. This .shp file has to be converted to separate side segments. To do ...
2
votes
0answers
92 views

QGIS - Alternatives to Offline Editing Plugin

I am looking for a way to edit my postgis layers offline (in field) using a Microsft Surface Tablet. I have been testing the "Offline Editing Plugin" unsuccessfully. These are the issues I have ...
2
votes
0answers
75 views

How to pull a shapefile into R from PostGIS database (in Windows)?

I'm currently working on pulling data from a PostGIS database for the first time to map in R and need some help. The database contains a shapefile of countries/regions of the world. I am able to pull ...
2
votes
0answers
47 views

display shapefile from postgres using arcmap?

I have uploaded shapefile using postgis extension in postgres but when i tried to display the shapefile in arcmap, it wont display the data in vector. this is the image of my connection. i followed ...
2
votes
0answers
36 views

“Point in polygon” counts that respond to filters?

I have a list of addresses in one layer and a polygon layer of census block groups for the local town, all stored in postgis. I have a nice display right now that labels each polygon with a count of ...
2
votes
0answers
42 views

Efficient processing of ST_ValueCount Results in Postgresql

General Problem: I have a table of rasters. The rasters are classified MSI images, so each pixel is an integer indicating the class of the pixel. For a number of regions, I am querying pixel counts in ...
2
votes
0answers
235 views

Compiling Postgis 2.2.0 on Raspian error doesn't install postgis extension

Installed postgresql 9.4 following this tutorial using the method of already compiled pkg. All seems fine with postgres installation. testdb=# SELECT name, setting FROM pg_settings where category='...
2
votes
0answers
37 views

Creating lines from lonely nodes in a linestring table to closest point on another linestring table

I want to segmentate a country (denmmark) by using barriers such as larger roads, railroads and the border/ coastline as the delimiting lines of the polygonise function in QGIS. But as most roads and ...
2
votes
0answers
37 views

Performance of 'extract by mask' tool in PostGIS?

Context: A large raster is clipped to create a bunch of smaller rasters based on a bunch of shapefiles. I've used st_clip() which seems to take forever looping through the different shapefiles, so I'...
2
votes
0answers
65 views

Cannot open QGIS form from PostGIS Layer with bigInt datatype for my primary keys?

Using QGIS 2.10.1 Pisa / PostgreSQL 9.4 with PostGIS. In PostgreSQL I have column oid with datatype is bigINT as primary key. These are 16-digit numbers. In QGIS I can read the table as a layer and ...
2
votes
0answers
30 views

Merge curved polygons with Postgis

is there any way to merge/union curved polygons in Postgis? "SELECT ST_UNION(the_geom) from public.polygons" can be executed, if the type of the_geom is Polygon, but doesn't work with the type ...
2
votes
0answers
111 views

How to export ESRI Geodatabase format .gdb from PostGIS

I found several posts explaining how to import a .gdb file into PostGIS. Is exporting also possible? For example using ogr2ogr to generate a .gdb file from query result.
2
votes
0answers
57 views

Creating new PostGIS connection in QGIS?

I am trying to create a new PostGIS connection and I am doing as it follows: The password I inserted is postgres, I don't know what should be inserted there. And when testing the connection, I get ...
2
votes
0answers
70 views

Error on qGIS with postgresql views

I have a PostGIS database with various tables and views. With pgAdmin I can make requests on the tables, on the views, all is working. I add tables in QGIS 2.8, it's working, I can read, write, modify ...
2
votes
0answers
91 views

How to create isometric 3D map with postgis

I am looking for a way to create isometric 3D maps based on data stored in a PostGIS database. My idea is to create a PostGIS function that will return a SVG image like the one below. It is easy to ...
2
votes
0answers
88 views

QGIS does not display all Features of Layer and behaves weird instead

I have a weird problem with QGIS trying to load a Layer from a Postgis Database When I open the Layer from Postsgis I have two choices: Method one: Either, I use the Panel "Browser", where I can ...
2
votes
0answers
73 views

Create Indexes Within a View? How could I Speed up Spatial Queries Over a View?

I´m trying to add a view from postgis using QGIS, what´s facile. The problem is that it´s taking too long to load it and to perform any kind of operation, for example, as simple as counting rows. It´s ...
2
votes
0answers
227 views

Extract TopoJSON directly from PostGIS

I have a simple "region" table: id (TEXT), name (TEXT), geom (MULTIPOLYGON). Here's the query I can use to extract a GeoJSON FeatureCollection: SELECT row_to_json(fc) FROM ( SELECT '...
2
votes
0answers
46 views

Are there methods of filtering gps-data with metadata?

In our project we captured GPS-tracks from a few electric vehicles in the timeframe of a year. In total we captured around 13000000 GPS-points this way. The captured data comes from electric powered ...
2
votes
0answers
22 views

Add individual fields to delete-log-trigger when deleting PostGis-Objects via QGis

I am using a PostGres Database with PostGis extension (on Windows). QGis serves as a client to access (visualize and edit) certain database-tables. I need to create a delete-log-table that saves all ...
2
votes
0answers
95 views

Optimize PostGIS query, ST_Intersects - Raster and Geom

I am trying to run a spatial query between two tables. Table one (prism_ppt_monthly - see below for details) is monthly precipitation data. Table two (usgs_basin_boundary - see below for details) are ...
2
votes
0answers
106 views

PostGIS for GPX analysis

I have GPX trails of vehicles/bikes of a particular city. Meaning, lat/lon, timestamp of bike trails from where a particular bike started and ended at different hours of the day. I have sets of these ...
2
votes
0answers
75 views

GeoDjango and bug with bounding box query

Just some context first, I have a postgres database with PostGIS extension, running under a GeoDjango wrapper. I have a weird bug that hopefully someone can shed some light on. I'm running a query ...
2
votes
0answers
52 views

QGIS: Edits in attribute table are not updated in Postgis database. Why?

As the title say. I edit values in the attribute tables of my QGIS project but there is no update to the database. I refreshed in QGIS as well as the database. What else do I need to do?
2
votes
0answers
126 views

Merge raster tiles in PostGIS

I have several raster tiles that are adjacent and non-overlapping, so they form a mosaic. I am trying to merge two adjacent rasters using PostGIS but am getting an error that they do not have the same ...
2
votes
0answers
144 views

How to create line segments between pairs of pixels in a raster?

I want to draw several lines between pixels (please see the image below) according to some criteria : First Criterion: The distance between 2 pixels is less than 2000m and greater than 500m ...
2
votes
0answers
57 views

Import OSM Notes dump into PostgreSQL?

I'm planning to write some software to improve handling of OSM Notes, so I need them in postgis database. Following the documentation I found there is notes dump on osm.org, but I can't find if ...