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

learn more… | top users | synonyms

1
vote
0answers
22 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
68 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
56 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
97 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
24 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
290 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
33 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
32 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
42 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
31 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
36 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
58 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
25 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
66 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
22 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
106 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
69 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
64 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
112 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
65 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
48 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
104 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
32 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
36 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
67 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
120 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
54 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
105 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
42 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
51 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
71 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
38 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
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
127 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
83 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
117 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
48 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
53 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
36 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
130 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
34 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 ...