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

learn more… | top users | synonyms

11
votes
6answers
5k views

Free map service for private web applications

Background Looking to display a map (for internal use only) on a web page. The application must be able to add custom layers (without sending the data to the map service host): Municipal zones (...
2
votes
0answers
9 views

PostGIS - raster - bit operations

I have a raster data in the database in separate rows. I would like to select 2 rows and do a bit operation with them (like |, &) and store the result in memory as a query output. Is this possible?...
0
votes
1answer
17 views

PostGIS Shapefile and DBF Loader - automatically Linked dbf file

This is my system: Windows 7 Postgresql 9.5 PGADMIN 3 PostGIS Shapefile and DBF Loader plugin I have imported data from a DBF file correctly with the plugin. My problem: This DBF file changes ...
2
votes
1answer
38 views

Default PostGIS type of geometry in SELECT

Is there an option in PostGIS (in query or table option) to set the return type of a Geometry? I'm using this query: select * from "locations" where "locations"."id" = 2 limit 1 And that will ...
4
votes
1answer
59 views

How to include aggregate field values of clustered points

I am creating a map that has point features representing things like campgrounds, picnic areas, boat launches, etc. In cases where many points are clustered in an area (representing amenities for the ...
3
votes
1answer
31 views

Unable to create field for PostGIS layer. PYQGIS

I'm having some troubles to create a new field in a postgis layer.This is the code I'm trying to use, but nothing happens, no field is created: from PyQt4.QtCore import * dbnam = "pruebapython" uri =...
2
votes
3answers
884 views

Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix: rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from accumulation;")...
0
votes
1answer
50 views

Getting uploaded shapefile into geometry field on PostGIS table?

I am working with a PHP web application where we have a user submitting a ShapeFile. I am able to convert that ShapeFile then to a format of geojson. What I am wondering now is how I can best ...
0
votes
1answer
30 views

How to calculate the start and end lat/lon of a linestring which is not a part of a ST_buffer?

I'm trying to find out the lat/lon of points on a linestring that are not contained inside a geometry formed by a ST_buffer. I can find if the linestring intersects the geometry but I'm not able to ...
3
votes
2answers
62 views

PostGIS - Get a point inside a line or polygon

I need to get the center point of a line or polygon to make marker for my app. So that when you click a marker the geometry appears (line or polygon). I used ST_Centroid to make it work. The result ...
6
votes
1answer
172 views

Interactive geographic region definitions

Background An organization has regions within a province, but has no list of coordinates that define region boundaries. I would like to draw custom polygon areas on a map using a web-based and user-...
2
votes
1answer
30 views

QGIS or PostGIS auto-split long line features

I have a dataset of LineStrings in a postgis enabled database and would like to automatically split any feature longer than a certain threshold (say 1 mile). I am aware of the Split Feature tool in ...
4
votes
2answers
297 views

Building a ol3 web application with dynamic content and user registration

My set-up: Currently I’m using a PostGIS database, with a GeoServer service and displaying the data with OpenLayers 3. I use WFS data to display the features in clusters and I’m able to edit them ...
1
vote
0answers
55 views

Adapting a ConvexHull fonction to a ConcaveHull one

I have a database with over 150 000 points in a EPSG 2950 projection. As I wanted to cluster those points in polygons, I used a ConvexHull fonction. The goal was to create clusters where I would find ...
1
vote
1answer
23 views

inserting points in postgis with pdo (php)

I have a problem with sql insert statement using PDO (php, postgis, postgres). I have tried to use different combinations, but none of them work. Here is what I ve got: $latitude= 46.07175; $...
2
votes
1answer
37 views

Seeking updated pgRouting Tutorial?

Is there an updated pGRouting tutorial to this: https://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ Trying to following it using QGIS 2.14.0 Essen + PostgreSql 9.5 (pgAdmin ...
0
votes
0answers
19 views

Using ST_* functions with different origin results in: Function not found

I've built a query which uses ST_asGeoJSON(); and If I run it on my server through pgadmin with credentials of UserX it runs like a charm. But when connecting through an webapp with other ...
0
votes
1answer
70 views

PostGIS - Calculate of the average distance between points for a delimited area

I am working with PostGreSQL I have 2 data sets: 1) A points layer where each point represents a building. 2) A Polygons layer created from the points layer using convexhull and clusterwithin ...
1
vote
2answers
28 views

How to make a WFS Layer read only in Geoserver?

So I imported some postcode data into a Postgis table and published the layer using Geoserver. As it is postcode data, there is absolutely no need for users to edit, so I would like to make the layer ...
1
vote
1answer
59 views

Finding locations within a radius of a given path [duplicate]

I am trying to figure out in Postgis the right sql statement for the following: I have in my database a table of merchants with latitudes and longitudes; I have a route from google that lists a lot ...
2
votes
2answers
28 views

Postgis meassuring distance between first and third points of a polygon

I am using ST_DumpPoints() function first to get the list of the different points in the polygon but after doing that, the first point is in one record and the third point is in another record and I ...
0
votes
2answers
40 views

How to solve Geoserver editing in QGIS returning read only error?

After creating a table in Postgis, making it available in Geoserver and then creating the necessary stores and layers, I loaded the resulting WFS file in QGIS. When trying to populate the features ...
0
votes
1answer
24 views

How to calculate nearest point to a linestring in PostGIS?

I'm following this question to calculate POI nearest a road(linestring). I'm able to calculate nearest points in the linestring but I'm not able to find the distance from the POI to nearest point(...
-1
votes
0answers
21 views

Cemetery Information Sys [closed]

I must be do a cementery Inf. Sys. but I have several trouble. I collect to cemetery data using topcon GR5 in land and I moved the table in ArcGIS program in cemetery records book. I pair it with ...
8
votes
1answer
3k views

Ring Self-Intersections in PostGIS

This is a follow on from previous question. You will see I am a new PostGIS user. I have looked at the validity of the topology in my data and find around 1700 topology issues in the landcover (...
1
vote
1answer
70 views

Creating polygons (squares) from point using PostGIS?

I want to create a regular grid of polygons/squares from this point knowing that between two successive points 100 meters, so each square would have 100*100 m2 in its area.
1
vote
1answer
100 views

Installing Aggregate Polygons Function in PostgreSQL 9.3

I'm new to PostgreSQL and I've been trying to run a sql function written by Dr. Horst Duester, found in http://www.kappasys.ch/cms/index.php?id=65&L=5, which is used to aggregate detached polygons....
2
votes
1answer
192 views

GeoDjango, distance filter based on database column

I have a geodjango model with fields coverage = 10 * 1609.344 reference_point = Point(-72,45) #or some other lat lng class ServiceArea (geo_models.Model): center = geo_models.PointField(default=...
2
votes
2answers
67 views

Start postgis (Opengeo suite azure linux vm)

I have a fresh Azure Linux VM based on Opengeo suite. The dashboard and geoserver are working. But I can't connect or configure postgis. I follow this guide. Via putty, logged in with the only ...
3
votes
2answers
69 views

ERROR: Only lon/lat coordinate systems are supported in geography

I'm trying to find out all the circles stored in the database(The circles are present all over the world) that intersect or overlap a given circle. I've stored the circles like this: CREATE TABLE ...
-1
votes
0answers
29 views

Error in using ST_Distance in plpgsql function [closed]

I want to calculate distance from address points to all streets within a distance of 50 meters using plpgsql. I have tried to write following function: Create or Replace Function get_dist(ad geometry,...
0
votes
1answer
26 views

ST_ColorMap problem in postgis

I run into ST_ColorMap problem in postgis. Here is the code fragment: r22=> WITH sfpoly AS ( SELECT ST_Transform(ST_GeomFromText('POLYGON(( 3727069.4991851943 4256930.979258035 , 4002242....
-1
votes
0answers
15 views

ST_ColorMap in postgis color changes from white to red [duplicate]

Can you tell me how st_ColorMap in postgis should be constructed if I need color changes from white to red?
1
vote
1answer
18 views

greatest-n-per-group comparing geometry Postgis

I'm working on a query that I think could fit under the greatest-n-per-group category. So here's a simplified version of the table: So these are samples taken with a ~10 year span. So I have the ...
2
votes
2answers
182 views

How to extract a new linestring vector from a existing multipolygon in QGIS?

What I want to do: create a new line (named linestring in Postgis?) from existing multipolygon layer in Postgis. Purpose: once these lines are created, I'll run some distance calcs from specific ...
1
vote
0answers
29 views

How to visualize PostGIS data(geography) in QGIS?

I've created a table that stores spherical circles located all over the globe. But I'm not able to view this data in QGIS. This is my table: CREATE TABLE circles(gid serial PRIMARY KEY, the_geog ...
0
votes
2answers
200 views

Create point on a line with given distance from end in PostGIS

Does anyone know how to create points along a line (MultiLineString geometry) with a given distance in PostGIS? I'd like to create points at a regular distance over a line, which represents a ...
1
vote
0answers
44 views

How can I remove only small inner rings in PostGIS?

I am looking for a way to remove small inner rings in a large polygon. I want to remove only the ones that are below a given surface and keep the bigger ones so that the the look (from a distance) is ...
1
vote
2answers
483 views

Starting Tile Sever Rendering Error: OSMBright.xml

I was following the entire process found here: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/ I have an error though on Testing your tileserver part where i run the ...
1
vote
0answers
19 views

Upload a raster in postgis

I know this might be a similar question to many others. I have been prompting multiple questions here and on google but I cant figure it out. I have a raster and I have uploaded it into postgis with ...
6
votes
1answer
234 views

Replacing corporate GIS? [closed]

I'm looking at replacing our corporate GIS, this is the first time that I have had the responsibility of such a task despite my years of experience with the software as an end user. We will be ...
0
votes
1answer
57 views

How can I change start and end point of a linestring?

I have a linestring from a pgRouting query. The start point and/or end poit of this line does not connect exactly the points I've clicked on the road and give me all the road segment of that edge (...
2
votes
1answer
147 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 ...
0
votes
0answers
9 views

gdal_rasterize source connection problem

I am running psql on R. I am using PostgreSQL server set the connection to my database by dbConnect. I am trying to run gdal rasterize where it pick up the information from my database query result. ...
1
vote
0answers
18 views

3D time dimension (x,y,t)

I'm working with data points (x,y) and timestamp t as a separate attribute in my table. (x, y) are in WGS 84 latitude,longitude format while timestamp is in Unix Time. For instance (71.8, -13.5) and ...
0
votes
0answers
41 views

Performance of selection all points lying 700 meters from one of 200 points [closed]

I have a table of about 5,000,000 points in PostGIS with a spatial index TABLE HYPERLOCAL(ID SERIAL primary key, location GEOGRAPHY(POINT,4326)) I've set up index and clustering CREATE INDEX ...
1
vote
1answer
34 views

Failed once again to import shape file to postgis DB using ogr2ogr

Once again I try to import a shape file to my remote postgis database using og2ogr. Last time it was an Odyssey but I have managed to solve all the issues and report them one by one here. I have ...