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

learn more… | top users | synonyms

2
votes
1answer
37 views

To check if a geometry is contained in a geomtery collection in postgis

How can I check if a geometry is contained in a geometry collection ? Specifically , I am using ST_ClusterWithin in PostGIS to get a cluster which returns each cluster as a geometry collection. Now I ...
2
votes
2answers
43 views

postgis How can I obtain directional buffer?

I have a geometry (polygon) which I want to extend with a buffer while testing on it in a where clause. The problem is that I would like the buffer to be only applied according to one or more ...
3
votes
1answer
48 views

Selecting polygons not covered by any other polygon (or BBox) in table in PostGIS?

In a table where many of the geometries might be completely covered by other ones, is there a query that selects only geometries that are not covered by any other geometry in the same table (excluding ...
3
votes
2answers
51 views

How to optimize QgsFeatureRequest with filter expression

I have a point PostGIS layer (my_layer) which has more than 66000 features. I am getting the features I want but it takes too long. My code is: resultList = [] req = QgsFeatureRequest()....
0
votes
0answers
44 views

ST_Distance between ST_Centroid and ST_Y

I'm trying to make a ST_Distance between a ST_Centroid and a ST_Y... But ST_Centroid is a geometry and ST_Y is a float. How can I make this? My query: SELECT ST_Distance(ST_Centroid(ST_Collect(...
2
votes
1answer
49 views

ST_LocateAlong interpolation: difference between PostGIS and Spatialite

In a previous question, I discovered that ST_LocateAlong along a LineStringM is not implemented the same way in Spatialite than in PostGIS. While PostGIS interpolates between measures, this is not ...
3
votes
1answer
63 views

Dynamic Linear Referencing of events in QGIS from Excel or CSV using virtual layer

I have a PostGIS table with a geometry type LINESTRING M to represent routes. Here is the table specification: CREATE TABLE routes ( fid serial PRIMARY KEY, r_name text NOT NULL, geom geometry(...
1
vote
1answer
63 views

In Postgres how to create columns with geometry?

I have point data stored in the postgis server and I need to create a new table with their geometry values. How can I extract their coordinates and translate them into a table. Something like: ...
0
votes
1answer
108 views

Parse and load GPX into database? [closed]

Having a PostgreSQL database, with the following tables: CREATE EXTENSION postgis; DROP TABLE IF EXISTS trips CASCADE; DROP TABLE IF EXISTS locations CASCADE; CREATE TABLE IF NOT EXISTS trips ( ...
2
votes
2answers
108 views

How to convert .csv with WKB to shapefile (.shp) using open source solutions?

I have a .csv file with hundreds of rows pulled out via PostGIS. The geospatial information is in "the_geom" field which seems to be in WKB-format. How can I convert this to shapefile using simple ...
1
vote
1answer
100 views

How to add X/Y coordinates and count of overlapping points in a postgresql table?

How to add to my postgres/postgis table the following columns X coordinate | Y coordinate | count (number of points in same location) from an existing table populated with geometries type POINT
0
votes
1answer
34 views

Writeogr to PostgreSQL/PostGIS database with R

I'm producing some Spatialpolygondataframes with R that I would like to upload to my PostGIS Database. I've found out that the way to do this is via the writeOGR() function using the PostgreSQL driver....
0
votes
0answers
27 views

Look Up table from (Latitude,Longitude) to country, city etc. boundaries (Bounding Box)

I'm looking for "Standard" assume file (?) containing best practice used simple "approximately squared" boundaries of countries, major cities etc. The use case is getting (Lat,Lon) and perform look ...
1
vote
1answer
34 views

What needs to be installed, to use ST_ClusterDBSCAN?

I have working PostgreSQL 9.5.3 with PostGIS. I have sucessfully created table and column with geom data type. I am able to execute geometry queries, namley ST_Transform without problem. # SELECT ...
0
votes
1answer
30 views

connecting Postgis, Python, Openlayers

I'm in the process of learning Geo-mapping and I'm curious to create a web-application Python-Django, Openlayers 3 and PostGIS. I need to know whether Django can be combined with PostGis and ...
1
vote
2answers
85 views

How to split a large point vector layer in QGIS?

I need to split my shapefiles into much smaller pieces so that I can upload them onto the Postgis server. Shapefiles have DBF files with 14 Go (1,000,000 rows) and I need them to be under 2 Go. I've ...
3
votes
1answer
79 views

PostGIS crosstab on multiple point tables

I have several point tabels, lets say 3. Tables are alike with two columns: a integer value and a geometry like: table sand1 (value int, geom geometry) table sand2 (value int, geom geometry) table ...
2
votes
1answer
89 views

How to use shp2pgsql to import a very large shapefile into PostGIS?

I need to import very large datasets into the Postgis server so I need to use the -D option in the prompt. Problem is that I'm getting an error no matter what I do. The command lines I'm using are: ...
0
votes
0answers
27 views

run shp2pgsql command in c# application

I worked for a month on this command but in vain ; really if someone already tried to help me find the error , because when I load the application displays the message to me as the shapefile was ...
3
votes
1answer
30 views

Converting PostGIS point to text causing loss of data?

I have a road network and want to test connectivity between the features. I am having trouble with two specific features, the rest of the dataset is functioning just fine. When I get those 2 links' ...
1
vote
1answer
41 views

PostGIS raster to UTFGrid

I am trying to create a UTFgrid JSON with a Raster in PostGIS. The goal is to provide weather data for web maps. I found some libraries: https://github.com/Ecotrust/create-utfgrids https://github....
1
vote
2answers
44 views

Backup GIS data on postgis database from pgadmin3

I am using a postgis database with qgis and managing it with pgadmin3 I have already investigated the backup/restore options within pgadmin 3 and done one test run on one database I am wondering if ...
1
vote
1answer
53 views

QGIS 2.14.3 export PostGIS layer to dxf issue

I am trying to export a PostGIS layer to dxf in QGIS (2.14.3) via Project>DXF-Export using the following settings (German GUI): When I open the resulting dxf in DWG TrueView 2016 I see nothing, but ...
0
votes
1answer
58 views

How can I change start and end point of a linestring?

I have a linestring from a pgRouting query. The start point and/or end poit of this line does not connect exactly the points I've clicked on the road and give me all the road segment of that edge (...
4
votes
2answers
86 views

PostGIS treating unique geometries as equal

I have two different geometries (albeit very closeby) that Postgres is treating as equal. db=> select '0101000020E6100000C5BCD8C5FEF45DC0AFE29EF87B584740'::geometry = '...
5
votes
3answers
58 views

Different values while calculating distance

I'm developing a project using LeafleatJS and PostGIS. Currently I'm getting trouble while calculating distance between two coordinates. For example: Point 1 - lat: -12.99835864475412, lng: -38....
1
vote
1answer
55 views

Creating shapes/lines from geo coordinates in postgis

Following the suggestion from this topic I'm posting my question here. I have a table in postgres/postgis with geo data and I want to show them on map via qgis. Here is the table: city | street ...
2
votes
3answers
172 views

How to export shapefiles from QGIS to PostGIS?

The tutorials I've been seeing such as this one https://saarapakarinen.wordpress.com/2015/06/13/tutorial-creating-a-postgis-database-for-qgis-part-2/ They mention a SPIT plugin that I can't find ...
1
vote
2answers
50 views

Show results of ST_Union in QGIS

Currently, I am working on SQL in PostgreSQL and I execute query of vector data by "ST_Union" function for the spatial data. Now, I want to access the result of query in QGIS 2.14, but I can't. Is ...
3
votes
2answers
52 views

FME - Copying a full list of 'user attributes'

I'm new to FME, so just getting used to the interface. I've loaded a template .fmw which has given me a full process, including an example 'Writer'. This writer is no use to me, and as I can't change ...
1
vote
0answers
18 views

I am using an example fracnsites to make a similar map but I don't under stand the ajax code?

I am using an example fracnsites to make a similar map but I don't under stand the ajax code? The example has js code: var map, fields = ["gid", "createdby", "featname", "feattype", "status", "acres"...
1
vote
0answers
32 views

QGis Graphic Query builder for PostGis

My question is about availabe QGis Plugins that could help me with the following issue: I have a PostGis database that has one shapefile as a main table and a lot of tables containing the shapefile's ...
2
votes
1answer
46 views

How to render mixed geometry from one table?

I have a table in postgresql with mixed geometry, but it is not accessible in QGIS. I am running QGIS version 2.8.2. Is there any plugin to install for QGIS to render multiple geometry?
0
votes
0answers
37 views

Problem with loop for pgr_Dijkstra

I try to use pgr_Dijkstra through Postgis and Pgadmin to find the shortest path in a network between a lot of nodes. So I thought I could to "automate" the process with a PLSQL query. Here is a query ...
0
votes
1answer
36 views

Error parsing GeoJson - parse error - invalid geometry

I'm trying to parse GeoJSON but getting a parse error. I've validated the GeoJSON using http://geojsonlint.com/ and http://geojson.io/. Using PostGIS 2.2.2 r14797, this is my SQL command: SELECT ...
2
votes
2answers
68 views

Start postgis (Opengeo suite azure linux vm)

I have a fresh Azure Linux VM based on Opengeo suite. The dashboard and geoserver are working. But I can't connect or configure postgis. I follow this guide. Via putty, logged in with the only ...
2
votes
1answer
37 views

How to generate rectangles considering only a percentage area of a base object?

I am trying to generate a rectangle by considering a small percentage of area of the extent of a geometry object in the PostGIS. I have tried to use the ST_Scale function. It successfully generates a ...
0
votes
1answer
50 views

Geocoding addresses based on own reference data

I have a historical addresses dataset in form: |Name |Description | Where "Name" is a single field with house number, street name, city and country. I have digitised two georeferenced ...
0
votes
0answers
24 views

PostGis - Geocode Milepost [duplicate]

I used this code to geocode milepost data and when i ran this i got result like this "01040000E0D408000000000000", so how to convert this result into Lattitude and longitude values ?? SELECT ...
2
votes
1answer
52 views

Using postgis ST_ClusterWithin() on a table

I am using the postgis ST_ClusterWithin function to cluster my spatial data in a table. I want to get the rows of the table as a result of the query clustering query (maybe the Pk's of each element in ...
3
votes
1answer
62 views

How to use search cursor in a given extent

I want to perform a selective search cursor for a feature class for a given extent. I have tried setting env.extent in the below code but it is returning the whole feature class instead of a fixed ...
1
vote
1answer
34 views

Query and display thousands of features

We have a feature table in PostgreSQL with PostGIS plugin, the table contains almost 200 thousand points. In the application, we need to query features according to different conditions (for example ...
1
vote
1answer
56 views

Lines from points in postgresql postgis

I have this table (all row aren't in order): time, id, latitude, longitude time is character varying and the format is: dd/mm/year hh:mm id, latitude and longitude are numeric I would create lines ...
0
votes
0answers
33 views

Generating polygons from lines and problem with rings

I have a problem when generating polygons from lines. I got dxf file with layers: cadastral parcels (as polygons) soil classes (as lines) Now I want to generate polygons for soil classes (so I ...
1
vote
1answer
71 views

Tableau: Using UK Shapefiles in PostGIS Database

I'm trying to use Tableau to display data. Some of this data is suitable for mapping, and therefore I'd like to create maps in Tableau to display this data. Unfortunately, neither the basic view nor ...
0
votes
1answer
45 views

select neighbour polygons in sql

I have a database of few milion records (all houses in my country). Now I want to select all records who have a neighbouring record (a house next to it) and give this a status 'T'. Each record has a ...
2
votes
1answer
73 views

Displaying data from a partitioned PostgreSQL / PostGIS table is unacceptably slow in QGIS

I have two very similar datasets of 27 million polygons stored in PostgreSQL / PostGIS. One is loaded as a single table, with spatial indexes and regular indexes on key fields. The other is ...
1
vote
1answer
42 views

PostGIS with clause not using spatial index

This query uses the spatial index and it's quite fast: explain select a.the_geom from chicago_major_streets a, stormevents_locations_2014 b where st_intersects(a.the_geom,b....
0
votes
1answer
41 views

Transform data type EWKT and GeoJSON to SRID 900913 [duplicate]

Is posible transform data type EWKT with SRID 0 for example: MULTIPOLYGON(((295098.566494 6006717.0377012,344018.26458971 6009163.022606,329342.355161 5972473.2490342,295098.566494 6006717.0377012))) ...
0
votes
1answer
28 views

PostGIS- Geocode Milepost data

I have the same question as described in this,I have numerous milepost address (like Milepost 58.3 , US 30,NJ) Is there a way to do this in PostGIS?