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

learn more… | top users | synonyms

0
votes
1answer
13 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) ...
0
votes
0answers
7 views

Connection Problem

I'm using PostGIS and then I'd like to make a PostGIS connection but I got this problem Connecting: host=localhost port=5432 user=postgres dbname=ASPIRE-PC Database connection failed: FATAL: ...
2
votes
2answers
46 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
160 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 ...
0
votes
0answers
8 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
365 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
352 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
85 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
31 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
21 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
236 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
251 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
67 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
220 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
19 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
32 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
22 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
32 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
35 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
585 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
755 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
73 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
47 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
35 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
688 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
64 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
9k 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
37 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: ...
1
vote
0answers
18 views

How to customize DB Manager default parameters

I'm using QGIS 2.10 and DB Manager plugin. I regularly use this plugin to display tables from a PostgreSQL - PostGIS database. I particularly use the integrated SQL Window to filter a table's content ...
4
votes
1answer
202 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
104 views

Alternatives to Offline Editing Plugin of QGIS? [on hold]

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
1answer
1k views

Problem in importing raster data from PostGIS to Geoserver

I am using Opengeo Suite 3.0.2, PostGIS 2.0.3 and PostgreSQl 9.2. I am trying to import raster data from PostGIS to Geoserver but facing an error. I follow this tutorial link to import the raster ...
0
votes
1answer
206 views

Issue using pgr_dijkstra from Postgres pgRouting

I am using Postgres with Postgis extension to retrieve streets (only for pedestrian use) and several "natural" points. I need to make updates every minute and i am working on a small bounding box. For ...
0
votes
1answer
1k views

How do I explode a MultiLineString using ST_Dump() in PostGIS?

I want to do what this blog post does: explode a MultiLineString into individual LineStrings. I'm using CartoDB but don't get individual LineStrings as the result of my query. I still get a ...
1
vote
0answers
28 views

PostGis - st_union polygons, keep sum of attribute

There are multiple My current query is: SELECT (ST_Dump( ST_Union( way ) )).geom AS way, 10000 AS way_pixels FROM ( SELECT way, way_pixels, ...
11
votes
6answers
5k views

Free map service for private web applications

Background Looking to display a map (for internal use only) on a web page. The application must be able to add custom layers (without sending the data to the map service host): Municipal zones (...
2
votes
0answers
14 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?...
0
votes
1answer
30 views

PostGIS Shapefile and DBF Loader - automatically Linked dbf file

This is my system: Windows 7 Postgresql 9.5 PGADMIN 3 PostGIS Shapefile and DBF Loader plugin I have imported data from a DBF file correctly with the plugin. My problem: This DBF file changes ...
2
votes
1answer
41 views

Default PostGIS type of geometry in SELECT

Is there an option in PostGIS (in query or table option) to set the return type of a Geometry? I'm using this query: select * from "locations" where "locations"."id" = 2 limit 1 And that will ...
5
votes
1answer
80 views

How to include aggregate field values of clustered points

I am creating a map that has point features representing things like campgrounds, picnic areas, boat launches, etc. In cases where many points are clustered in an area (representing amenities for the ...
3
votes
1answer
37 views

Unable to create field for PostGIS layer. PYQGIS

I'm having some troubles to create a new field in a postgis layer.This is the code I'm trying to use, but nothing happens, no field is created: from PyQt4.QtCore import * dbnam = "pruebapython" uri =...
2
votes
3answers
890 views

Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix: rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from accumulation;")...
0
votes
1answer
50 views

Getting uploaded shapefile into geometry field on PostGIS table?

I am working with a PHP web application where we have a user submitting a ShapeFile. I am able to convert that ShapeFile then to a format of geojson. What I am wondering now is how I can best ...
0
votes
1answer
33 views

How to calculate the start and end lat/lon of a linestring which is not a part of a ST_buffer?

I'm trying to find out the lat/lon of points on a linestring that are not contained inside a geometry formed by a ST_buffer. I can find if the linestring intersects the geometry but I'm not able to ...
3
votes
2answers
64 views

PostGIS - Get a point inside a line or polygon

I need to get the center point of a line or polygon to make marker for my app. So that when you click a marker the geometry appears (line or polygon). I used ST_Centroid to make it work. The result ...
6
votes
1answer
173 views

Interactive geographic region definitions

Background An organization has regions within a province, but has no list of coordinates that define region boundaries. I would like to draw custom polygon areas on a map using a web-based and user-...
2
votes
1answer
33 views

QGIS or PostGIS auto-split long line features

I have a dataset of LineStrings in a postgis enabled database and would like to automatically split any feature longer than a certain threshold (say 1 mile). I am aware of the Split Feature tool in ...
4
votes
2answers
299 views

Building a ol3 web application with dynamic content and user registration

My set-up: Currently I’m using a PostGIS database, with a GeoServer service and displaying the data with OpenLayers 3. I use WFS data to display the features in clusters and I’m able to edit them ...
1
vote
0answers
57 views

Adapting a ConvexHull fonction to a ConcaveHull one

I have a database with over 150 000 points in a EPSG 2950 projection. As I wanted to cluster those points in polygons, I used a ConvexHull fonction. The goal was to create clusters where I would find ...