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

learn more… | top users | synonyms

3
votes
1answer
62 views

Importing ESRI shp / gdb files with M value into Postgis

Has anyone done this successfully? I have been using DB Manager in QGIS 2.12 and my MutilinestringM values are converted to Multilinestring in PostGIS. When I use the PostGIS shapefile importer, this ...
3
votes
1answer
47 views

PostGIS, no use of gist for geometry column in a query

My query is: SELECT count(datasetid) FROM scenes WHERE acquisitiondate between '2014-06-01' and '2015-06-01' AND ST_Intersects(ST_GeographyFromText('SRID=4326; POLYGON((' || '10.66437' || ...
2
votes
0answers
87 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
2answers
74 views

Postgis Functional Index on st_pointonsurface() Ignored

If I define the following table... CREATE TABLE tbl_vast_importance( id bigserial PRIMARY KEY, geom geometry(MultiPolygon,4326) ); CREATE INDEX ON tbl_vast_importance USING GIST (geom); CREATE ...
4
votes
1answer
45 views

Separate isolated polygons using PostGIS

I am new to PostgreSQL and have been trying to separate polygon features in a PostGIS Table into 2 different Tables based on a condition. All polygons which touch or overlap with one another needs to ...
0
votes
0answers
53 views

How to correct this error Caused by: java.lang.ArithmeticException: / by zero in geoserver

My environment is: geoserver 2.8.1 image mosaic JDBC java 1.7.0_79 centos 6.7 postgresql 9.4.5 postgis 2.1.8 I used ImageMosaicJDBC to publish my tiff image in geoserver. But, I get the error ...
3
votes
0answers
50 views

Cached vector tiles with dynamic attributes

I am looking to implement a web map of property boundaries and owner information. The parcel data (property boundaries) is updated infrequently, but the assessment data is updated weekly, as ...
0
votes
0answers
58 views

Tile server and postgis db with OpenSeaMap data, how to render icons?

I am trying to build a tile server in a windows machine with the OpenSeaMap data. I set up my postgresql database and populated with the world.osm data (OpenSeaMap data) and the water polygons. I ...
3
votes
0answers
71 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 ...
1
vote
0answers
28 views

Incorrect results returning from st_distance_spheroid query

Given a routable network table constructed by completing the guide at http://anitagraser.com/2011/02/07/a-beginners-guide-to-pgrouting/, how can I get an accurate list of all roads that are within a ...
2
votes
2answers
81 views

PostGIS raster MapAlgebra callback optimization

I'm trying to speed up an ST_MapAlgebra callback function that essentially takes a raster with four bands, checks each band for values less than a given number, and where the check is true, return the ...
1
vote
0answers
44 views

Are GIS tools suitable for physical capacity and placement management?

I'm a complete newbie to GIS systems, I've been watching some introductory videos about GIS but I'm not yet sure if GIS tools are the right tool for solving my problem. I have a database with ...
2
votes
1answer
48 views

Renaming a table in the QGIS DB Manager

When creating a PostGIS table (e.g. 'lakes') in the DB Manger a primary key ('lakes_pkey'), a index ('sidx_lakes_geom) and a sequence ('lakes_gid_seq') are also created. But when renaming the table ...
2
votes
1answer
25 views

How to provide a query point as input to a PostGIS query?

Let's say I want to write a query, which returns all the coffee shops within 100 meters of a (lat, lon) pair, provided by the user. Right now I take the lat and lon from the user and then create a ...
2
votes
1answer
42 views

Error in transforming SRID in PostGIS 9.3

I am tying to use ST_Transform to shift SRID from 4326 to 25832. However, the resulting coordinates are far from the correct positions. select x, y, ST_AsText(ST_Transform(ST_SetSRID(ST_MakePoint(x, ...
2
votes
2answers
43 views

How many query points fall within distance X to a set of LineString

I have a set of 10 query points and I want to know how many of them are with distance within at most 4 meters of any LineString in a given table. Note that if a point is within 4 meter distance to ...
2
votes
1answer
51 views

PostGIS Geography Query not working

HI I’m struggling with returning data from the following query. It should be returning all data within a 5k radius of a given Longitude, Latitude point. SELECT stuff FROM MyGeoTable WHERE ...
4
votes
1answer
62 views

Datum and transformation error using ST_Transform in PostGIS, going from NAD83 to NAD27

I created a function in PostgreSQL to transform input coordinates using UTM Zone 12/13, with Datums NAD83 or NAD27, to the WYLAM projection. I had to manually create the entry for the proj4text ...
5
votes
1answer
92 views

Dissolve overlapping polygons according to percent overlap using PostGIS?

I have a shapefile with convex hull polygons, all in the same layer/shapefile. Some of the polygons overlap (not duplicate polygons). I would like to dissolve/union the polygons which overlap with ...
2
votes
1answer
55 views

Bring a list of unsorted linestrings in order so that they form a path from origin to destination

I have a table of linestrings together with some attributes that, when displayed all at the same time, represent a connected path from an origin to a destination (each linestring has one predecessor, ...
1
vote
2answers
68 views

Reduce query time when using both MySQL and PostgreSQL with PostGIS

I am doing a tracking query. The device is sending its location data, timestamp to store in MySQL Database. I want to show the query result of every point with its nearest POI. The POI database is ...
1
vote
1answer
39 views

Referencing variables inside ST_Distance_Sphere function

I trying to create an UPDATE function that will ultimately return straight-line distance to the nearest node on an OSM network (which will be later added to pgrouting distances I have already ...
1
vote
1answer
33 views

Bad Layer in QGIS switching from PostGIS ST_DWithin from ST_Within

I can create a view in PostGIS using ST_Within and render it in QGIS without errors. If I change to ST_DWithin (note the D) it creates a valid view in the database, but bad layers in QGIS. This ...
2
votes
1answer
39 views

How to propagate attributes down several line features?

I have a PostGIS database of road features which are split at intersections. Some of the features on an individual road have certain attribute info (i.e. speed limits) and others do not. I want to ...
6
votes
0answers
44 views

Preventing invalid values in PostGIS geography

If I use pgAdmin to insert a point with an invalid latitude, say 91°, I receive the following notice before the query completes successfully: NOTICE: Coordinate values were coerced into range ...
2
votes
1answer
29 views

Preprocess OSM streets to see if query points fall “on” them

I am interested in the following query: Given a set of query points ($\leq 10$), how many of them have distance at most $s$ meters to the closest point on the closest street. What's the most ...
2
votes
3answers
54 views

Update existing Postgres table from KML?

This is related to this question, but different because it's about PostGis, not Django. I'm using Postgres 9.4 with PostGIS extensions. I have a KML file, and I want to use it to update the ...
1
vote
1answer
27 views

postgis update value from another table that intersects

I have a point table called t1 and a polygon table called t2 that are neighbourhoods. I want to record neighbourhoods name from t2 into t1 that falls in. My query is: update t1 set ti.f1 = t2.t2 ...
3
votes
0answers
40 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
1answer
74 views

Running Gevel on PostGIS 2.0

I have found Gevel, a tool enabling the visualization of the content of the GiST indices in Postgres. In particular, I am interested to use it to visualize the RTree spatial index in PostGIS. Does it ...
3
votes
1answer
37 views

Install PostGIS from source for specific PostgreSQL version [closed]

I have two versions of PostgreSQL on my machine (Ubuntu 12.04) one is 9.1 and the other one is 9.4. I want to install from source (I have my reasons) postgis 2.1.2 over PostgreSQL 9.4, but when I ran ...
3
votes
1answer
64 views

Need WFS-T for field work on GeoServer/PostGIS

I'm using a Boundless install of OpenGeo Suite on Ubuntu Server 12.04 with Tomcat 7. I need to allow remote access to update from the field. I can edit features fine on network, but not remotely. ...
13
votes
4answers
263 views

How to create lines to visualize differences between polygon features in PostGIS?

I've a PostGIS table polygon_b with some polygon features. There is also a table polygon_a which contains the same polygons as polygon_b but with minor changes. Now I want to create lines to visualize ...
4
votes
3answers
66 views

Unexpected behaviour using ST_Equals() with QGIS

Let's say there is a table 'polygon_a' and a table 'polygon_b'. Each table contains three polygon features. The polygon features are spatially equal. CREATE TABLE polygon_a ( gid serial NOT NULL, ...
1
vote
0answers
37 views

update query with st_intersects() is not finding results

So I am trying to identify which items from the requests table fall into some particular district from the district table using postgis. Basically, I am writing an UPDATE query that will take the ...
1
vote
1answer
54 views

Postgis cannot open out of db dted file

I import a dted file into a postgis enabled database with the -R option. I also gave the complete directory path to the file. I also have the raster and gdal related environment variables on the ...
3
votes
1answer
119 views

Strange behavior of of ST_Intersects in PostGIS

I'm quite new to GIS and PostGIS and, probably, this question has been already answered multiple times, but unfortunately I was not able to find an answer. I have few polygons and I want to find ...
8
votes
0answers
81 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 ...
0
votes
0answers
96 views

How to find a polygon from coordinates provided

I am really new with PostGIS, and I need to find a polygon providing (lat - long) coordinates. My goal is, get the coordinates x and y passed by parameters, and find the polygon which where this ...
2
votes
0answers
51 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 ...
1
vote
1answer
38 views

Syntax error in a query with ST_AsText and ST_CENTROID

I have a table in a PostGIS database where with this query : SELECT ST_CENTROID(pol8.geom) AS geom FROM polygon8 AS pol8; I got this: geom ...
3
votes
1answer
64 views

snapping line nodes to points

I have a dataset of manholes and pipes; I want to snap the lines start and end nodes to the manholes if they are within a specified distance. Been trying to find away to do this using PostGIS or QGIS ...
1
vote
0answers
28 views

PostGIS Street Intersection Autocomplete with full text search

What I'm attempting to do is create a custom autocomplete for addresses, road intersections, POI's, etc. For now we are going to using Mapbox GL (we'll be creating a custom map at a later phase), ...
0
votes
0answers
33 views

Installing Osm2Pgrouting on debian?

I'm new to Postgis. I'm trying to install osm2pgrouting on debian, but when I run cmake -H. -Bbuild I get an error : Could not find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found version ...
1
vote
1answer
75 views

Difference in EPSG:28992 (RD/Amersfoort) definitions

I need to do some projections between WGS84 (EPSG:4326) and the Dutch RD system (EPSG:28992) in JavaScript. I use Proj4js for this. When adding the definition from spatialreference.org I noticed a ...
1
vote
1answer
54 views

ST_Intersection between MultiPolygon tables leads to gaps, missing intersections

I am trying to intersect two MultiPolygon tables, which are in the same UTM projection, and calculate the area of their intersections. I am getting some surprising results when I examine the ...
4
votes
0answers
63 views

Postgis sequence in QGIS not working

I have a Multipolygon-Layer stored in a Postgis-database. The primary key field 'gid' is SERIAL. When trying to add a new polygon in QGis (LYON 2.12.1 on OSX El Capitan), the attributes form shows me: ...
3
votes
1answer
101 views

Update GeoDjango models from KML?

I'm working in Django 1.9 and Postgres 9.4 with PostGIS extensions. I have a KML file, and I want to use it to update my geo fields. This is my model: class PCT(models.Model): code = ...
4
votes
1answer
92 views

GeoDjango with PostGIS: distance_lte filter is inaccurate

My view code (relevant part): location = self.GOOGLE_MAPS.geocode(lookup) if len(location): page = int(request.POST.get('page')) or 0 start = page * settings.PHOTOS_PER_BATCH end = (page ...
2
votes
1answer
283 views

trouble restoring dump, $libdir/postgis-2.1 missing

I have a university project in which I continue a project of last year. I never used those tool and I'm getting the following error: ERREUR: n'a pas pu accéder au fichier « $libdir/postgis-2.1 » : ...