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

learn more… | top users | synonyms

30
votes
6answers
15k views

Migrating geodatabase data into PostGIS without Esri apps?

Can you tell me how I can load geodatabase data into PostGIS without having to install Esri apps? The solution I found online talked about using ArcGIS to convert GDB to SHP and then importing SHP ...
0
votes
1answer
28 views

Updating OSM data

I'm trying to keep my OSM PostGIS data up to date by reading this tutorial http://wiki.openstreetmap.org/wiki/Minutely_Mapnik The time periods are minute, hour and day, but I think a daily update is ...
1
vote
2answers
248 views

Utilizing OSM Data in a Postgres/PostGIS database in ArcMap

I've been trying for over a week now, and I'm not sure what i'm doing wrong and I haven't found the answer yet. I am trying to display and symbolize the OSM dataset over Jordan in ArcGIS for Desktop ...
0
votes
1answer
41 views

Load a specific spatial data from a postGIS table

A single postGIS table contains multiple type of spatial data(example: Linestring,Polygon,etc.,). How to load a specific spatial data from PostGIS table into QGIS by using pyqgis?
1
vote
1answer
23 views

How to load specific PostGIS features from a given table into QGIS?

I have a table in my database built like this: contour_id / (INT) project_id / (INT) contour_lvl / (INT) contour_geom (MultiLineString Geom) Each row in this table is a contour feature associated ...
2
votes
0answers
32 views

Error editing 'editable' view in QGIS

Taking some code from this post, I've been trying to create an 'editable' view in PostGIS. I'd like to store label placement properties in a separate table, build a view of the data I want to use for ...
1
vote
1answer
25 views

PostGIS - ST_PointOnSurface and ST_Centroid dropping Z

I am using Postgres 9.5.2 and PostGIS 2.2.2. According to the documentation ST_PointOnSurface should not drop Z. This is what happens. If I run SELECT ST_AsText(cell) AS pt FROM cells LIMIT 1 I ...
0
votes
0answers
43 views

Timezone map including territorial waters

I have a project that requires timezone lookup for given coordinates. http://efele.net/maps/tz/world/ is an awesome resource however the polygons only cover land. Sydney Harbour is considered seas in ...
3
votes
1answer
355 views

Close linestring to linering in PostGis

is there a function which closes a linestring to a linering? I couldn't found such a function in the documentation.
9
votes
1answer
2k views

Help with PostGIS polygon geometry - non-closed rings

I've picked up a copy of the super-wicked book 'Python Geospatial Development' by Erik Westra (Amazon link), and I'm working through it. Currently, it's teaching me to load GSHHS coastline data from a ...
1
vote
1answer
20 views

Visualization of dynamic data on top of OpenStreetMap tiles?

I want to show dynamic data (say .2 sec update) from a postGIS database displayed on top of OpenStreetMap data. I am very new to GIS so not sure how to go about this. I am thinking something like: ...
4
votes
1answer
4k views

How to import QGIS Raster into PostGIS

I have created a IDW heatmap using QGIS 1.8.0 and need to import the raster into PostGIS 2.0.1. QGIS saves the raster layer as a .asc file. How do you import the raster into PostGIS as a Raster? What ...
0
votes
0answers
46 views

Read a vector layer from a Postgres/PostGIS database via a SQL query with QGIS and ogr in a python script

I have a treatment table for different aggregation stategies on a geospatial table in a PostgresSQL/PostGIS database. The aggregation strategies addressing temporal and species specific pre-selections ...
1
vote
1answer
188 views

shape file into DataSet in postGIS using openJUMP, but getting error

I am new to this field and I want to save my shape file into DataSet in postGIS using openJUMP, but I'm getting an error...can anybody tell me solution for this?
0
votes
1answer
67 views

How can I make buffer with ST_Buffer in PostGIS

I am trying to make a buffer(0) as a fix-geometry process in PostGIS 2.2.2. It like this: SELECT ST_Buffer(ST_GeomFromText('POINT(100 90)'),0,4); I am using sources from this man-page. It ...
0
votes
1answer
59 views

Calculate centroid of a point cluster

Having this function that inserts locations in a database: def insertLocation(cur, label, point): print label cur.execute(""" SELECT label, centroid, point_cluster ...
0
votes
0answers
233 views

WFS with authentication to PostGis (or to shape)

Is there a way to import data from a WFS layer to a Postgis table (or to a shape)? there are blogs explaining how to do it in 3 steps (http://anitagraser.com/2012/09/26/wfs-to-postgis-in-3-steps/) or ...
1
vote
1answer
188 views

Postgis ST_Distance query returning inaccurate results

I am using the following query to retrieve records from a postgresql DB @services = Service.select("*, ST_Distance(services.lon_lat, ST_GeomFromText('POINT (lat lon)', 4326)) as st_distance").order("...
0
votes
1answer
50 views

Calculate average multilinestring point elevation

I'm triying to calculate the average elevation of some multilinestring points. Is there a fastest way than this pgsql function? CREATE OR REPLACE FUNCTION topstation.sig_moyenne_z(ingeom geometry) ...
2
votes
1answer
86 views

Setting threshold for unions in PostGIS?

I have a shape file of buffers. What I'm trying to do is to merge the buffers that intersect, but not just if any part of the buffers intersect. I would like to set a threshold, for let's say if 50% ...
3
votes
1answer
348 views

Conflicts while installing postgresql9.3-postgis2.1,QGIS and gdal-bin

I want to use postgresql9.3-postgis2.1 and gdal-bin parallel . I have refer instruction here for installing postgresql-9.3 on ubuntu 12.04. I have install qgis from here While installing gdal-bin it ...
2
votes
2answers
55 views

ESRI ASCII. Latitude and longitude in a in raster

I've started a new project that involves a ESRI ASCII grid. As far as i know it is a map of Germany or the UK (I'm not sure which one). This is how the header looks like: NCOLS 8083 NROWS 12952 ...
9
votes
1answer
170 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 ...
2
votes
0answers
22 views

How can I show photos in popup from a ByteA (postgis) in QGIS (or Google Earth/map)

I currently have a postgis database with a table containing point geometry of fire Hydrant. This table contains a raster_blob field which contains the Fire hydrant picture taken by field workers. ...
4
votes
2answers
388 views

How to migrate spatial tables from MSSQL to PostGIS

I'd like to migrate my spatial data from MS SQL Server to PostGIS. Originaly the data was stored with SDE under MS SQL. Then I migrated with an ArcGIS tool. That created a spatial data column with ...
2
votes
1answer
368 views

pgsql2shp ERROR: incompatible mixed geometry types in table

I have multi-linestring in .shp files and I split the lines with postgis, but that result is only geom column. It does not works with shape file exporter error: incompatible mixed geometry types ...
3
votes
1answer
109 views

Transform coordinate to EPSG:4978 fails

I am trying to transform a geometry to the EPSG:4978 projection. As the EPSG:4978 was missing in the spatial_ref_sys table, I have added it using the following query: INSERT into spatial_ref_sys (...
1
vote
1answer
43 views

Split multiple attributes from a big polygon to smaller ones

I am looking for a sort of spatial (un)join function. Let's say I have 2 tables, both with a large number of polygons. The first one has a pop/polygon column in his attribute table. The 2nd one has ...
0
votes
1answer
28 views

postgis_tiger_geocoder nationscript.sh does not set the location of PSQL correctly

This generated nationscript includes the following line: PSQL=${PGBIN}/p (...) I have tried 'umpteen' variations of replacements, including the logical one: the physical path to the psql file. I am ...
2
votes
2answers
239 views

Error in displaying wfs layer from mapserver/postgis

I have read and tested all the relative posts but I still don't have a solution for my problem. I have a layer suscribers (points) stored in postgis database with srid=32232. I would like to display ...
0
votes
1answer
285 views

How to check overlap between two sets of Linestrings using postgis

I have 2 sets of LINESTRINGS, each set containing around 50 LINESTRINGS(which form a road), how do I check whether these two sets overlap or not ? Thanks in advance.
3
votes
1answer
75 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 ,...
7
votes
2answers
2k views

Automating batch load of multiple GPX files into PostGIS

I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, ...
8
votes
1answer
224 views

PostGIS Recursive Query Based on Line Connectivity

I'm having difficulty with a query. I have a network of linestrings, each with a value in the n_type column. This can be one of a handful of options. I'd like to generate a new table that groups any ...
0
votes
1answer
29 views

Importing shapefile issue postgis. no import made or recognized reference

I am doing an exercise where I am about to load shapefiles into i PostGIS-database. I am doing it from an already created database and schema, this will mean that the only new item is the table that ...
0
votes
0answers
40 views

Crop raster files when importing with readGDAL from DB

I have quite a lot of raster files stored in a PostgreSQL DB. Each of them has around 200MB and is representing EU-wide data. However I only need the the rasters to cover the area of Germany. I'm ...
1
vote
1answer
31 views

Drape multiple lines on a DEM with Postgis

I am trying to drape lines on a DEM by following this great tutorial: http://blog.mathieu-leplatre.info/drape-lines-on-a-dem-with-postgis.html When I do it on a single line by giving points ...
1
vote
1answer
39 views

QGIS Offline Editing Tool

I tried to test the QGIS Offline Editing Plugin but it appears not to work at all. I'm using qgis 2.14.3 running on a Lenovo Yoga 900 and Windows 10 on the client side. For the server I'm running ...
0
votes
1answer
49 views

Write GeoJSON As Feature Object in Postgis

I'm trying to create a geofence/circle from a lat/long set and I'm close except that the GeoJSON that PostGIS creates differs in structure from the client library that our front-end uses. Here is my ...
1
vote
2answers
604 views

can't geocode with PostGIS 2.1.1

I don't know where's the mistake... I am using the process from the PostGIS documentation (http://postgis.net/docs/manual-2.1/postgis_installation.html#loading_extras_tiger_geocoder) . I created a ...
2
votes
3answers
765 views

Importing MaxSea 3D Database to PostGIS

I am currently working on a project, where I combine several MaxSea 3D databases, which contain depth measurements made by the echosounder onboard on a ship. The idea is to combine these databases to ...
-1
votes
2answers
78 views

ST_DWithin matches wrong points

The following query crosses every city called "London" with every "place" (both of which are in London, UK) and calculates the distance. The points are of type geography. SELECT c."Name", ...
2
votes
1answer
51 views

PostgreSQL Shapefile import failed

I am very new to PostGIS/PostgreSQL. In fact, I downloaded it because of the answers I got to this question: Distance between centroid and farthest point of polygon I installed both PostgreSQL and ...
1
vote
1answer
39 views

How to select first coordinates in multipoint or in collection used for point reducing?

I am using PostGis and I have geometry like this: MULTIPOINT(1673118.56314624 5778263.30559826,1672914.41092247 5778129.131443,1672384.7731665 5778105.44570288,1673513.70724225 5778525.74090022) ...
3
votes
1answer
694 views

Uploading raster format(*.tif) to postgis through raster2pgsql

I'm new to postgis and raster file format. i currently working on netcdf files and i want to import it into postgis through curl command line tool but its failed for me.so i jump on to GDAL v1.9.2 ...
-1
votes
1answer
68 views

Converting latlong into PostGIS geometry?

I have this excel spreadsheet with latlong coordinates in it and imported it into Postgis Problem is that I can't represent it on Geoserver because there is no typical Postgis geometry column How to ...
75
votes
9answers
10k views

Getting started with PostGIS?

I have been reading a lot about PostGIS, but I am struggling to find a good beginner's guide. Which tutorials/books do you recommend?
0
votes
0answers
41 views

postgis iterate over rows (cursors)

I need to repeat the same set of operations for each road polygon by using an id (road_id): I have tested my code only on one polygon of geometry using a series of functions inside a WITH query: ...
4
votes
1answer
210 views

How to transform isolines to isopolygons with postgis?

I have a table a postgis table of isolines that's defined like this: CREATE TABLE myisolines ( gid serial NOT NULL, isotime timestamp without timezone, val numeric(10,4), geom geometry(...
2
votes
0answers
118 views

Alternatives to Offline Editing Plugin of QGIS? [closed]

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 ...