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

learn more… | top users | synonyms

0
votes
0answers
12 views

Speeding up query that finds difference between linestring and multipolygons? [on hold]

I've a linsestring and 8 million points of hazardous sites spread all across the globe. These sites have an impact within 20km radius. So, I've stored the points as ST_Buffers of 20km radius. The ...
2
votes
1answer
31 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 ...
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 ,...
0
votes
1answer
17 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 ...
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
219 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
12 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
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
29 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
19 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
32 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
71 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
44 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
33 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
61 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
34 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
17 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 ...
3
votes
1answer
200 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
205 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
27 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
77 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
889 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
63 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 ...
1
vote
1answer
25 views

inserting points in postgis with pdo (php)

I have a problem with sql insert statement using PDO (php, postgis, postgres). I have tried to use different combinations, but none of them work. Here is what I ve got: $latitude= 46.07175; $...
2
votes
1answer
38 views

Seeking updated pgRouting Tutorial?

Is there an updated pGRouting tutorial to this: https://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ Trying to following it using QGIS 2.14.0 Essen + PostgreSql 9.5 (pgAdmin ...
0
votes
0answers
21 views

Using ST_* functions with different origin results in: Function not found

I've built a query which uses ST_asGeoJSON(); and If I run it on my server through pgadmin with credentials of UserX it runs like a charm. But when connecting through an webapp with other ...
0
votes
1answer
73 views

PostGIS - Calculate of the average distance between points for a delimited area

I am working with PostGreSQL I have 2 data sets: 1) A points layer where each point represents a building. 2) A Polygons layer created from the points layer using convexhull and clusterwithin ...
1
vote
2answers
30 views

How to make a WFS Layer read only in Geoserver?

So I imported some postcode data into a Postgis table and published the layer using Geoserver. As it is postcode data, there is absolutely no need for users to edit, so I would like to make the layer ...
1
vote
1answer
61 views

Finding locations within a radius of a given path [duplicate]

I am trying to figure out in Postgis the right sql statement for the following: I have in my database a table of merchants with latitudes and longitudes; I have a route from google that lists a lot ...
2
votes
2answers
30 views

Postgis meassuring distance between first and third points of a polygon

I am using ST_DumpPoints() function first to get the list of the different points in the polygon but after doing that, the first point is in one record and the third point is in another record and I ...
0
votes
2answers
44 views

How to solve Geoserver editing in QGIS returning read only error?

After creating a table in Postgis, making it available in Geoserver and then creating the necessary stores and layers, I loaded the resulting WFS file in QGIS. When trying to populate the features ...