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

learn more… | top users | synonyms

0
votes
0answers
16 views

Geoserver Training Material Error - Installing WPS and wms-eo plugin

I have installed Geoserver training package from geo-solutions. Following this link - Tutorial from geo solutions Works perfectly. Though when I am trying to add Web Processing Service (WPS) ...
5
votes
1answer
103 views

How to get smallest line segments from intersection + difference of multiple overlapping lines?

Inspired by this question, and this excellent answer. I have multiple overlapping lines and want to extract the complete intersection of them. So from this sample data SELECT id, geom INTO stackex ...
2
votes
2answers
149 views

points within a polygon

Since I am a beginner to postgis I am facing problem with finding points within polygons from my table. This is my table structure Column | Type | ...
2
votes
0answers
23 views

Can't delete postgis

geo2=# create extension postgis; ERROR: PostGIS is already installed in schema 'public', uninstall it first geo2=# create extension postgis_topology; ERROR: required extension "postgis" is not ...
0
votes
0answers
13 views

Performance of PostGIS view vs shapefile for WMS in GeoServer? [duplicate]

What does GeoServer render as WMS faster, a layer using a postgis view or one getting data from a shapefile? The data I am working with is a table with 55k rows and with 30 columns, with multipolygon ...
-3
votes
1answer
33 views

Storing PostGIS view for GeoServer? [closed]

I want to know, where this view is actually stored in the server, and how does it interact with the database. I saw that the size of the database is increasing when GeoServer try to serve/create some ...
2
votes
1answer
18 views

How to polygonize using GeoDjango and PostGIS?

The code of GeoDjango-1.9.2 contains reference to the function ST_Polygonize at: https://github.com/django/django/blob/master/django/contrib/gis/db/backends/postgis/operations.py#L132 But is it seems ...
6
votes
1answer
97 views

Direct Connection from Postgres to ArcGIS results to two feature classes per table

I'm using ArcMap (10.3.1) to connect to Postgres (9.4.5), which has Postgis version 2.2.0 installed. Create/Enable Enterprise Geodatabase wasn't used in this database. It's just a connection to the ...
0
votes
0answers
36 views

Calling cmd command from stored procedure in PostGIS

How to execute the command prompt from stored procedures in PostgreSQL. Below is cmd command to convert PostGIS data to image: PG:"host='<host>' port:'<port>' dbname='<dbname>' ...
0
votes
1answer
84 views

run command line shp2pgsql in c# function?

i'm developing an application web with asp.net/c# and i would in a button importing the shapefiles into postgis, and i'm trying with this code, this code i'm using it in cmd.exe in windows it imported ...
0
votes
2answers
46 views

PostGIS: MultipolygonZ to floating point raster

I am trying to convert a table of MultipolygonZ geometries to a floating point raster where the pixel values of the output raster will be derived from the Z values of the MultipolygonZ geometries. The ...
0
votes
0answers
26 views

Converting PostGIS data to image [duplicate]

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 ...
5
votes
1answer
56 views

What is the best way to merge lots of small adjacents polygons ? (POSTGIS)

I am looking for a way to merge lots of small adjacents polygons. I have this kind of features: So if my polygons are adjacents AND have the same color attribute then I want to merge those ...
3
votes
1answer
62 views

Optimising a very large point in polygon query

I have a national dataset of address points (37 million) and a polygon dataset of flood outlines (2 million) of type MultiPolygonZ, some of the polygons are very complex, max ST_NPoints is around ...
0
votes
0answers
66 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
236 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
49 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
44 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
38 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
83 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
51 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
23 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
69 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
57 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
98 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
25 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
291 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
33 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
46 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
34 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
68 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
25 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
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
66 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
49 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
107 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
123 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
107 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 ...