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

learn more… | top users | synonyms

0
votes
1answer
46 views

CartoDB - PostgreSQL row_number() using PostGIS ST_Distance

I'm currently working on a query that should return a subset (i.e. "new") CartoDB table sorted by proximity to a given point. I want to display labels on the map corresponding to the closest, second ...
2
votes
1answer
54 views

Removing duplicate labels from different tables

I am making a map using data stored in PostGIS. I am serving multiple layers in the map (POIs, Cartographic, Roads etc.) and when I label these layers I have repeating labels, this is because some ...
2
votes
1answer
45 views

PostGIS function ST_SymDifference between two segment groups produces unexpected results

I try to calculate the symmetric difference for a set of segment groups A and B with precision of 1E-5 (ST_SnapedToGrid(geom,1E-5). I've formulated the an ideal test case for a H based shape segment ...
0
votes
0answers
59 views

GeoDjango: Insert geography coordinates and filter the nearest points, step by step

I would like to: Save pairs of srid 4326 (latitude, longitude) points in a PostGIS Geodjango 1.8 Database. (Maximum distance between the edge points: 2.000km) Given a srid 4326 (latitude, longitude) ...
4
votes
3answers
210 views

What's wrong with my ArcGIS - PostGIS setup?

I have installed ArcGIS and PostGIS, and I'm having a hard time connecting them. I've imported some shapefiles into PostGIS and I can see them and manipulate them in pgAdmin. The trouble is that I ...
0
votes
0answers
40 views

SQL script for postgis column name with colon

I have an sql script that creates some tables from the default planet_osm_point, planet_osm_line, planet_osm_polygon tables which are created with the osm2pgsql command line tool. DROP TABLE IF ...
0
votes
0answers
38 views

Moving a marker along a WFS road layer

I have WMS base layer and a WFS road layer published from PostGIS database using GeosServer and Openlayers. The two layers are displaying fine on the map. How can I move a marker along the road like ...
0
votes
0answers
14 views

PostGIS Tilemill subquery

I need to find a way to merge ways into one long lines with the same attributes. I heard I can use st_union but I don't know how. I have a postgresql data base connect with tilemill. It works fine but ...
0
votes
1answer
47 views

Alpha Shapes in pgRouting

I am attempting to follow Anita Grazer's post on creating alpha shapes in pgRouting. My query: CREATE TABLE home_isodist (id serial, max_cost double precision); SELECT ...
1
vote
1answer
44 views

PostGIS - st_intersects using polygons that cross antimeridan/equator

New to using PostGIS and have two situations that I'm working with. In the one case, I have a polygon that crossed the antemeridian and was detecting whether a two separate points located within that ...
1
vote
0answers
48 views

Problem with ST_Union

I have loaded some rasters into Postgis. I did a lot of ST_XXXX (scale, snap to grid,resample) magic to make them aligned. After executing: select r1.rid,r2.rid ...
0
votes
0answers
18 views

Insufficient permissions: The project file not is writable?, QGIS

I have QGIS-server running, with PostGIS-layers in my project. When making changes I can´t save them. The above log comes up? How come? Normally it works fine.
0
votes
1answer
55 views

Is there some method on Ubuntu to request newest postgresql postgis package rather than specific version?

There is postgresql-9.3-postgis-2.1 and there is postgresql-9.4-postgis-2.1. Unfortunately 9.3 is available only on trusty and 9.4 is not available on trusty (see ...
0
votes
1answer
40 views

PostGIS Query Geometry Field Truncated

Some of the geometry fields that are returned from my PostGIS queries are truncated. When I first found this error any geometry fields with more than a few thousand characters would not show up in the ...
1
vote
0answers
19 views

How to use the TopoViewer in the QGIS DB Manager?

I'm just wondering what the TopoViewer in QGIS is doing. DB Manager (PostGIS) says 'Schema "schemaname" is not registered in topology.topology'. Unfortunately there is no help available and I can't ...
2
votes
2answers
106 views

PostGIS get the distance between two points over a linestring

I have a linestring: LINESTRING(-1.3326397 50.9174932,-1.3319842 50.9166939) and I select two points that lay on that linestring. I would like to get the distance between these two points (in ...
1
vote
1answer
38 views

Points within a box

I need to get all points within a box to display them in a flat map. The column in the database is a geographic point. Im using the following query SELECT * FROM asset a WHERE a.point::geometry ...
3
votes
1answer
59 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
45 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
75 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
73 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
42 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
47 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
45 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
54 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
66 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
27 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
78 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
44 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
41 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
41 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
54 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 ...
4
votes
1answer
84 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
52 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, ...
0
votes
2answers
54 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
36 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
35 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
39 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
52 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
24 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 ...
2
votes
0answers
35 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
66 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
36 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
61 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. ...
12
votes
4answers
244 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 ...