PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

8
votes
0answers
137 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
69 views

Accessing the internal data structure storing Postgis spatial index (PostGres GiST)

I am curious about how the internal data structures and storage mechanism of the spatial GiST index in Postgis. In Oracle, I used to like to show how the SDO indexes were "just another table", and how ...
7
votes
0answers
180 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
90 views

Leveraging capabilities of PostGIS for large (ish) tables in PostgreSQL?

I am using PostgreSQL and PostGIS to do some exploratory analysis and eventually spatial analysis. I have a table with 40M+ points (geolocated tweets) in the United States that has a spatial index. I ...
6
votes
0answers
148 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 ...
5
votes
0answers
134 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
223 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
543 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 | ...
4
votes
0answers
27 views

Parallel feature request connection limit

I have a large pool of feature requests that need to be performed on a PostgreSQL layer. Please assume that these requests cannot be joined into larger requests. If I spawn several threads to perform ...
4
votes
0answers
33 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
77 views

How to load layers from postgres using SELECT statement?

I am trying to load a postgres table (columns extracted using a select statement) from the python console in QGis: The following works fine and the layer loads as expected: uri = QgsDataSourceURI() ...
4
votes
0answers
102 views

Adding data from PostgreSQL to Query Layer of ArcGIS for Desktop warns that given coordinate references are incompatible?

When adding data from PostgreSQL in a Query Layer I get the warning: The given coordinate references are incompatible I have added many other layers with the same properties no problems, but I ...
4
votes
0answers
501 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
3k views

Error when register database with ArcGIS server

I am using Arcgis 10.1(x32) and I have successfully connect postgresql(x64) as geodatabase. When I try to register database with Arcgis server 10.1(x64), I followed the instruction on the esri' ...
4
votes
0answers
669 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 ...
4
votes
0answers
725 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
18 views

Why QGIS WFS doesn't update PostGIS line and polygon layers?

I installed PostgreSQL and PostGIS and created PostGIS layers in GeoServer. But when i want to change geometry in QGIS via WFS it drops an error: ": Error performing insert: java.lang.String cannot ...
3
votes
0answers
23 views

PostGIS - ST_SetValues is slow

I have large data in my C++ program (up to 3000x3000). I have connection to PSQL with PostGIS. Now I need to store my raster data (greyscale images) in DB raster. I am using ST_SetValues for this and ...
3
votes
0answers
43 views

Interpolating point to nearest polygons to compute street width in posgis

I am trying to calculate the width of streets (line.shp) in postgis using reference point (ref_point.shp) (yellow point features) and building polygons (building.shp). The red point features are the ...
3
votes
0answers
68 views

How To save Geo-Tiff image in PostgresSQL?

I have a Geotiff image, which I want to load into a PostgreSQL database. Currently I am using the command line code for saving this image to my database : raster2pgsql -I -C -e -Y -F -s 26986 -t ...
3
votes
0answers
50 views

Layers created by GeoServer do not display in Mapbender3

I have installed GeoServer 2.7.2 on my local windows 7 machine, which retrieves data from a remote PostgreSQL server. The data is represented in layers just fine! I also have installed Mapbender3 ...
3
votes
0answers
49 views

QGIS isn't displaying dates in the attribute table

I have a QGIS project that links to data in a Postgres database. For some reason, QGIS is not displaying any data in date fields. The date fields appear to be fine in Postgres and I have performed ...
3
votes
0answers
489 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
326 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
538 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
475 views

How to load the default layer style from Postgresql with Python?

I would like to write a python macro that upon opening my QGIS project file will reload the default style for each layer from the postgres 'layer_style' table. I have had a look at the documentation ...
3
votes
0answers
573 views

Select features within a country or bounding box effectively using PostGIS

I imported the planet OSM file into a PostgreSQL 9.2/PostGIS 1.5 server using osm2pgsql. I now want to select certain map features which lie within the bounding box formed by a countries borders, e.g. ...
3
votes
0answers
897 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
401 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
240 views

OSM Database created: now what happens?

I imported an OSM file into a Postgres DB using the Osmosis tool. Now, I need to extract some data but I can't find any schema description (I'm really a newbie in GIS). Where can I find it? Do you ...
2
votes
0answers
17 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
30 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
61 views

Insert shapefile draw features into PostgreSQL database using java EE (pragmatically)

I am working with PostgreSQL 9.4 and Java EE i want to insert shapefile or layer's features into PostgreSQL, is there any solution so i can insert the whole shapefile into database. OS Windows10. ...
2
votes
0answers
23 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
98 views

How to calculate width and lengths of street layer in Postgis/PostgreSQL?

I was able to project the point location (ad.shp) to the nearest street (line.shp) like this. My approach was like this. I used ST_ClosestPoint() to iterate this for every point location within a ...
2
votes
0answers
78 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
35 views

ogr2ogr imports GML data (not from OSM) to Postgis but without the other_tags “hstore”-column

The problem I'm encountering some issue trying to use ogr2ogr to import some GML input data (not OSM) into Postgres. I'm trying to use COLUMN_TYPES=other_tags=hstore to store all the fields not ...
2
votes
0answers
35 views

TopoGeometry commands with postgres are really slow

After messing around quite a while, I was finally able to get a topogeometry converted from my geometry table following the example of toTopoGeom. I have the topology extension, with a topology schema ...
2
votes
0answers
32 views

Create network graph from contiguous polygons in KML, or PostGIS?

I am using Postgres 9.5 and PostGIS. I have a table with a geometry field. This table has about 200 rows, in each of which the geometry field contains a Polygon. I would now like to derive an ...
2
votes
0answers
47 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
39 views

How to display join query results on a sublayer in CartoDB.js application?

I'm working with my first CartoDB.js application. I created a visualization on the app using cartodb.createVis('map', visjson_url, opts); The app has two layers, base map and data layer. the data ...
2
votes
0answers
45 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
41 views

Enumeration in QGIS

When I am using QGIS 2.8.3. I want to use a series of predetermined set of texts, such as 'wood', 'brick','concrete'. I have created an enumeration file in SQL, I do want to link that my existing ...
2
votes
0answers
37 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
68 views

Dijkstra's Algorithm direction issue

I am trying to implement Dijkstra's algorithm, my query is working fine if I set direction parameter to false. I have to consider the direction of travel while calculating route from point A to point ...
2
votes
0answers
34 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
40 views

Changing border style in OpenStreetMap?

I am trying to figure out how to change OpenStreetMap country borders color/thickness. I've set up a tile server using OSM data, PostgreSQL & Mapnik. The default mapnik style is used. There ...
2
votes
0answers
44 views

How to clean the postgres instance while setting cartoDB locally in ubuntu

I am following https://github.com/danseely/cartodb-install/blob/master/DEV-INSTALLATION.md for setting cartoDB locally in ubuntu12.04. While installing cartoDB-postgresql, the second install check ...
2
votes
0answers
95 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
60 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 ...