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

learn more… | top users | synonyms

0
votes
0answers
69 views

Converting PostGIS data to an image

I have an image showing the height information of a map. I have created a table using the 'raster2pgsql' command. This table stores the height values of the map. Now I want to create an image out of ...
2
votes
1answer
298 views

Spatial clustering with PostGIS including attributes

Spatial clustering with PostGIS including attributes I have a points table with some attributes like : year, type, etc. And I'd like to do a points clustering in PostGIS. I followed the subject in ...
1
vote
1answer
54 views

Duplicate entries in table list when adding PostGIS layer in QGIS

When adding PostGIS layer in QGIS (version does not matter) i observe duplicate entries in the list as can be seen below (e.g. ax_gebaeude, ax_flurstueck, ax_gehoelz...), one with a valid geometry, ...
4
votes
1answer
46 views

Find polygons that does not contain (any) polygons with PostGIS

New to PostGIS, I have a polygon layer of water catchment areas which are formed by the specific monitoring points along the river upstream. For example, on one river, there could be multiple areas, ...
2
votes
1answer
40 views

Alternatives to ST_OffsetCurve

I've created a query that creates a line that is perpendicular to my original line using ST_OffsetCurve to draw a line left and right of my original geometry, which I then select the line center of ...
3
votes
1answer
90 views

ST_Transform doesn't work in PostgreSQL

When i run the query with ST_Tranform I get this error: Input geometry has unknown (0) SRID SQL state: XX000 How can I resolve this error? I want to convert from UTM into geographic lat/lon. ...
2
votes
1answer
54 views

How to update PostGIS column with distance from features in the same table

I have a table 'mytable' with columns 'Geometry', 'featurecode', 'height' and 'pkey'. There is a spatial index and im using PG9.4 For most of the table the height column is null. Only where ...
1
vote
0answers
34 views

PostGIS: intersection of a MultipolygonZ and a floating point raster

I am trying to isolate the pixels in a floating point raster (loaded in PostGIS) that intersect my MultipolygonZ table (also loaded in PostGIS) and whose values are less than or equal to the z values ...
1
vote
2answers
77 views

Simplify geometries but keep them contiguous

I have several detailed contiguous areas. I need to turn each one into KML, but when I do so, the end result is too large (in terms of memory). Using PostGIS I need to simplify these geometries but ...
2
votes
1answer
64 views

Update one table from another based on spatial join

In beginning i had two tables of points and i wanted create from one of this POINT table new table CIRCLES which will contain circle polygons 300 metres around points. This step i have done here: ...
2
votes
0answers
103 views

How to calculate width and lengths of street layer in Postgis/PostgreSQL?

I was able to project the point location (ad.shp) to the nearest street (line.shp) like this. My approach was like this. I used ST_ClosestPoint() to iterate this for every point location within a ...
2
votes
1answer
27 views

QGis postgis sequence is ignored

I have a problem adding new features to a Postgis database. My table has a primary key defined as gid integer NOT NULL DEFAULT nextval('bo_gid_seq'::regclass) When I try to add a new polygon in ...
9
votes
2answers
313 views

How to make Great Circle Arcs which look good on a Web Mercator map?

I'm trying to create a map, with data indicating some flights, and want to use Great Circle Arcs, to connect the source and destinations. Basically, I want to do something similar to the famous ...
1
vote
1answer
35 views

ST_DWithin use_spheroid argument for data projected in Web Mercator

When calling ST_DWithin in order to fetch data to overlay an area selected on a Web Mercator map, should false be passed to the use_spheroid argument of the call to ST_DWithin, since Web Mercator ...
1
vote
1answer
46 views

Using Postgis spatial index in st_distance operation based upon explicit SRID column

I have two large tables with data that spans over multiple regions of the U.S and needs a defined SRID column in atleast one the tables to denote which coordinate system should be used for ...
0
votes
1answer
48 views

GeoDjango - Find all locations within X miles of provided point using bounding box

I'm trying to implement some search functionality for a web app, and have run into an issue where I don't know the proper functions to execute this. Given a Point, a bounding_box database field with ...
1
vote
1answer
36 views

Transform Natural Earth data to 27700

I'd like to know how (if possible) to transform the shapefiles I've downloaded from the natural earth datasets which are in EPSG:4326 to BNG EPSG:27700. So far I've loaded the shapefiles I need into ...
1
vote
1answer
42 views

How does the parameter “offset” work with the ST_LocateAlong/ST_LocateBetween PostGIS function?

I try to understand the ST_LocateAlong/ST_LocateBetween PostGIS function. The documentation tells me this: geometry ST_LocateAlong(geometry ageom_with_measure, float8 a_measure, float8 offset); ...
2
votes
0answers
61 views

How to get the area of a bounding box using PostGIS 2.2?

As someone who is doing a data integrity check of Geonames, I've found that about 10 percent of the data contain multiple sets of coordinates (longitude, latitude) for a place name within a country. ...
1
vote
1answer
27 views

Parting lines based on intersection with polygons

I have two tables: roads containing one row (line) for each road with column road_code uniquely identifying the name of the road; districts containing one row (polygon) for each district with column ...
1
vote
1answer
74 views

Conversion from Point 2D to Point 3D with measures

I have a number of PostgreSQL empty tables I am trying to setup for my data. I added the Point Geometry to one but later discovered it is X,Y aware and not X,Y,Z aware. How can I change this? I could ...
0
votes
1answer
30 views

How to add/create features in postgis layer without geometry?

I have a Postgis layer loaded in QGIS 2.8.6. There is empty POINT geometry field that I have to fill with geographic information. How do I add features to this layer without adding new geometries? ...
4
votes
2answers
107 views

PostGIS Geography Buffer producing different areas?

I'm trying to create circles of equal area in different places, but depending on the location of the centroid different areas are calculated. For example SELECT ST_Area(ST_Buffer('POINT(0 ...
3
votes
1answer
72 views

How to use regular expressions within QGIS Actions

I have stored html links in a column of a postgis layer. There are a few entries which have multiple links stored in one cell (blank separated). I have to use the firefox.exe to open the links in ...
1
vote
1answer
92 views

Distance measure of ST_ClusterWithin

I use SRID 4326(WGS 84). So what is the measure of distance in ST_ClusterWithin . m, km, degree ? I ask it because in documentation it only says: geometry[] ST_ClusterWithin(geometry set g, float8 ...
1
vote
0answers
116 views

What is the recommended way for team coordination in GIS (ArcGIS, QGIS, etc.) [closed]

I am preparing a team of around 18 GIS analysts to work on 12h/12h work cycle to attain 24h/day work rate. This means two 9-person teams, one for each period. All analysts will have access to various ...
3
votes
1answer
67 views

Projecting points towards selected line layer in PostGIS/PostgreSQL

I have a point layer (ad.shp) and street layer (st.shp) and I am trying to project the points to the selected street in a distance of 20 meters (snapping all points to the lines within 20 meters) ...
1
vote
1answer
59 views

How to insert raster in PostGIS from java JDBC

I have been looking for a solution to store dynamically generated raster data into PostGIS from java and PostGIS JDBC. I am working with geotools toolkit but i am unable to find any documentation ...
0
votes
0answers
29 views

PostGIS: Merge features based on column value

I have a table planet_osm_roads. The table has one column ref that indicates the code of the road. Let's say that I have a road coded 'AA1' which is represented by 5 segments (or rows in the ...
6
votes
1answer
112 views

Why isn't QGIS detecting CRS from .prj file?

I have a number of 1 km hexagonal grids that cover various counties in the United States in a postgreSQL/postGIS database. Each grid has the CRS EPSG:3857, and the counties layer has EPSG:3857. When ...
1
vote
2answers
33 views

What is the format for OSM lat/lon in .osm/.osh files and how to import correctly into PostGIS?

I've been having issues converting OpenStreetMap geometries to valid points in PostGIS. MY PostGIS table has the this definition for the geom column: SELECT ...
1
vote
1answer
39 views

Is there an 'average' algorithm for st_resample()?

Currently, the docs for ST_Resample() give options for NearestNeighbor (English or American spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. ref: ...
2
votes
1answer
70 views

Setting a threshold for unions

So I have a shape file of buffers. What I'm trying to do is to merge the buffers that intersect, but not just if any part of the buffers intersect. I would like to set a threshold, for let's say if ...
4
votes
2answers
130 views

Filter data with PostgreSQL or geoserver?

I'm working on a PostgreSQL database with PostGIS. I need to filter an 8 million records table in order to publish a view through geoserver. I know two ways to do that, one is that I create view in ...
3
votes
0answers
63 views

Clipping raster with Postgis raster

I'm using Postgis 2.1.5 on Ubuntu 15.04. In my system there is a second disk mounted with the raster data as /media/name1/data/rasters/*.tif. The *.tif are good looking when I watch the metadata with ...
4
votes
1answer
111 views

How to conveniently generate a Google Maps link from a PostGIS geometry?

When working with a spatial database, it is often convenient to make a sanity check for a location of a point by viewing it on Google Maps (or any other online mapping service). Copying the lat/lon ...
1
vote
2answers
47 views

Using PostGIS to query shape files

I am very new to PostGIS (started using it this morning). My goal is to determine if a lat/long point is contained inside a polygon that is described in a shape file (The shape file has a single ...
0
votes
0answers
52 views

How to deal with different projections in PostGIS spatial analysis?

I am doing something wrong, but try as I may, I can never seem to grasp all aspects of how to project layers in GIS. I am working with two files: 1) The USGS maintains a list of locations with ...
1
vote
1answer
93 views

CRS transform from EPSG 4326 (WGS 84) ? to EPSG 27700 (OSGB 1936 / British National Grid)

I have a table which is an import of a shp file from www.geofabrik.de/ England > Roads. I've tried to change the CRS to EPSG 27700 but when I add this back to QGIS along side other layers which are ...
4
votes
1answer
41 views

PostGIS raster - sum of rasters

I have raster data stored in a PostgreSQL/PostGIS database. I need to create a summed raster from certain rasters. Something like: select sum(raw_data) as image from data where rid > 2 AND rid ...
2
votes
2answers
58 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
50 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
138 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
93 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
148 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
59 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
33 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
68 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
57 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
40 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 ...