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

learn more… | top users | synonyms

2
votes
2answers
56 views

PostGIS bbox with two tables

I am new to using PostgreSQL/PostGIS. I have two tables that I've imported from two shapefiles. One table is based on points called "shape_points" and the other based on polygons called ...
3
votes
1answer
44 views

Importing / copying data from PostGIS to ArcGIS / ArcMAP

So, I'm working on a project using Postgresql and Postgis. We have a client using ArcGIS (10.0) and ArcFM. We are trying to export some data from postgres to ESRI, but we have our hands tied quite a ...
6
votes
4answers
128 views

PostGIS query for selecting features not connected to rest of road network?

I have a dataset of roads in a city stored in a PostGIS enabled database. I would like to identify and remove any feature which is not connected to the rest of the road network. This behavior is ...
2
votes
2answers
85 views

Why does FeatureClassToFeatureClass work in ArcMap but not in Python script?

When trying to copy a feature class from an SDE connection file to a scratch GDB, the FeatureClassToFeatureClass_conversion works in the ArcMap Python window, but I can't get it to work in a Python ...
4
votes
1answer
119 views

Styling OSM data with OSM-Carto

I have set up on Ubuntu a tile server by following this tutorial I followed the instructions for downloading and configuring osm-bright, but now I want to use the openstreetmap-carto stylesheet. In ...
1
vote
1answer
50 views

PostGIS raster geoTiff simple Lat/Lon query example

I've successfully loaded a geoTif into PostGIS (Postgresql 9.3.9) using the following command on my Ubuntu 14.04 server:- sudo -u postgres raster2pgsql -s 4326 -d -I -C -M -R -l 4 ...
2
votes
1answer
32 views

Source for multipolygon data?

I have a PostGIS database where I would like to store multipolygon data of certain cities. The type of the table column is geometry(MultiPolygon,4326). I'm now looking for a source where I can get ...
1
vote
0answers
55 views

How to IDW interpolation in PostGIS

I'm trying to find PostGIS Raster functions supports the Inverse Distance Weighted interpolation method (IDW) and Kriging interpolation method. I'm especially trying to generate a temperature map ...
2
votes
1answer
37 views

Cannot generate nationscript.bat - Tiger Geocoder

I have been attempting to install tiger - geocoder in a postgres database. After muddling through examples and resources online for days I have been able to conjure up this much of the workflow. I ...
0
votes
1answer
38 views

Unexpected results when using ST_Intersection for polygon features

I've to create a spatial intersection of two tables (poly_a and poly_b) containing polygon features. Is there any way to remove unexpected linestring results? CREATE VIEW poly_intersection AS SELECT ...
3
votes
1answer
51 views

Postgis Query Construction - postgresql

I'm a newbie and I need a little bit help with postgis query construction. My situation looks like this. I have a table in postgresql with ways converted from bicycle routes (take from Open Street ...
4
votes
1answer
132 views

Smallworld > FME > PostGIS > QGIS, handling geometry types

I'm migrating data from Smallworld via FME/SpatialBiz Plugin to a PostgreSQL/PostGIS Environment and then trying to open the resulting tables with QGIS 2.12.1. Problem arises, because Smallworld ...
1
vote
0answers
44 views

Copy Polygon to Postgis from Shapefile

I have the following situation: Postgres database with PostGIS There is a table with a PostGIS geometry column. All non geometry data is managed (create, update, delete) by a webapplication. QGIS ...
0
votes
1answer
27 views

How to use svg symbols for styling elements in ms4w (mapserver)?

I have MapServer installed in a windows machine. I have imported into my PostGIS db osm data and want to style certain elements(nodes) with svg symbols. The problem is that the version of MapServer ...
1
vote
1answer
36 views

Visualizing results of an aggregate function query

I want to visualize the results of an aggregate function in CartoDB. For example I want to understand and visualize the top 20 owners of land by acres with the following query. As single owner often ...
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
62 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
211 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
41 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
39 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
46 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
20 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
41 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
113 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
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
78 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
47 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
68 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
79 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
42 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
55 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 ...