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

learn more… | top users | synonyms

0
votes
0answers
45 views

PostGIS and QGIS connection using queries?

I have a shapefile and a table which I import both of them to PostGIS. With pgAdminII I am able to manipulate the table, join to shapefile and calculate new fields. When I try to do that with python ...
1
vote
0answers
39 views

Length not respected in ST_Segmentize

When segmentizing a geography line in Postgis, the max segment length does not seem to be respected when the line is more than 3000km. The error grows when the length of the line increases. Below the ...
1
vote
0answers
29 views

Multi-dimensional points in PostGIS

I have experience in PostgreSQL but I am fresh new in PostGIS and I can see how quickly would I like it. I have extensively worked on time series and now I am discovering the spatial side of my data. ...
3
votes
1answer
50 views

Is Sandy Springs, GA actually Atlanta, GA (ambiguous cities while geocoding)?

I installed postGIS and the associated TIGER geocoder for work, and noticed a strange thing when geocoding some addresses in the Atlanta area. For example, when I geocode the address "8610 Roswell ...
3
votes
1answer
91 views

Update table based on closest point between its geometry(Point) and another table's geometry (MultiLinestring)

I think my question is rather simple, but being new to PostGIS, I can't figure it out myself nor being able to transfer knowledge of other questions to my issue. The problem: I have two tables ...
2
votes
0answers
29 views

“Point in polygon” counts that respond to filters?

I have a list of addresses in one layer and a polygon layer of census block groups for the local town, all stored in postgis. I have a nice display right now that labels each polygon with a count of ...
1
vote
2answers
118 views

libiconv-2.dll missing when running shp2pgsql

My system is Windows 7 with PostgreSQL 9.4 and PostGIS 2.2. I'm running shp2pgsql program from command line (cmd window, not PSQL interface). shp2pgsql "D:\file.shp" schema.table > file.sql I'm ...
3
votes
3answers
40 views

Circle created using ST_Buffer displays elongated on map

I am buffering a point to create a circle in PostGIS like: ST_Buffer(geo::geometry, .0002, 8) However, when displaying the polygon in Bing maps it ends up a vertically oriented ellipse or elongated ...
0
votes
1answer
45 views

Why I can not edit my postgis layer? [duplicate]

After a working break of a couple of weeks, I start do work on my last project. But I can not edit my postgis-layers anymore! Its possible that I did several system-upgrades, and maybe there was also ...
3
votes
1answer
25 views

how to create a new row with a counted points in postgis

I have two tables in postgis (pgadmin). In one table there are points and in the other table there are polygons(provinces). The tables are both over the same location (Netherlands). I want to count ...
0
votes
1answer
50 views

Where to download .osm files and how to convert it to .xml? [closed]

I am new to deal with OSM data, and I want to download only .osm files not .pbf. I tried geofabrik.com but it provides .osm.pbf file format where can I download .osm files? is there any recommended ...
4
votes
0answers
57 views

Create polygon from lines in PostGIS

I'm trying to divide a polygon in smaller polygons from a line, but I think I can't use the st_split function. What I need is to create small polygons inside a big one, using linestring grid. I've ...
3
votes
0answers
96 views

ERROR: PostGIS is already installed in schema 'public', uninstall it first

None of the threads in stack exchange related to this error helped me to resolve this issue. Hence I am posting it. I have installed postgres 9.3 and PostGIS 2.1 Now I have done the following su ...
2
votes
1answer
37 views

How do I select polygons that overlap by a specified percentage of overlap?

I have two polygon layers. One represents parcels, the other is a hazard zone. How do I return only parcels where more than 30% of the parcel area overlaps the hazard zone? For example a parcel with ...
3
votes
2answers
78 views

What is an undirected graph with cost and reverse cost?

What is the purpose of a graph that is "undirected, with cost and reverse cost"? Where is the difference to a graph that is "undirected, with cost" ? For me it does not really make sense, because for ...
1
vote
1answer
45 views

Bounding rectangle of a geography

How to get a bounding box (in the form of a Polygon, or anything else where it's easy to extract the corner coordinates from) of a given Geography item? Something that would look like: SELECT ...
1
vote
1answer
31 views

Help using ST_Buffer for points

So I am trying to do a where clause on a select and my code is ST_Within(shape::GEOMETRY, ST_Buffer(ST_GeogFromText('@Value(_location)'), 5, 'endcap=round join=round') I am trying to buffer the ...
0
votes
1answer
91 views

Setting upgrade path to PostGIS 2.2

I have OS X - El Capitan. I have installed PostGIS 2.2 (brew shows "postgis 2.2.0 already installed"). But when I run "ALTER EXTENSION postgis UPDATE TO "2.2.0"" - it returns - "ERROR: extension ...
1
vote
1answer
42 views

QGIS feature subset with WFS

I have GeoServer running locally, serving up a large table of vector points stored in Postgres. I have enabled a time dimension on GeoServer, from a column of type TIMESTAMP WITH TIMEZONE. from QGIS, ...
3
votes
2answers
73 views

Dissolving with PostGIS slow and results in large table?

I am having a table of polygons with some 15 Mio. records. The polygons hold an attribute called "dn" with integer values between 0 and 6. My goal is to simplify that table so that polygons below a ...
4
votes
1answer
42 views

PostGIS ST_AsTIFF function raises memory exception?

We have a satellite image loaded into PostGIS. We've calculated a reflectance raster from that image and stored the results as 32BF pixels. There are 54 1000x1000 tiles in the reflectance raster. I ...
2
votes
1answer
73 views

Zonal statistics of polygon overlays in PostGIS

I am trying to do a seemingly simple task -- extract mean pixel values from a raster based on a polygon overlay in PostGIS. I consulted several sources, including this blog, this blog, and this post). ...
1
vote
1answer
34 views

Get lat and long in two columns as floats for all points in MULTILINESTRING in PostGIS?

ST_DumpPoints(geom) gives me something like this: ("{1,1}",0101000020E61000002DEDD45CEEB362C0CE1951DA1BC24E40) ("{1,2}",0101000020E6100000C94AD826F1B362C09D4B7BC72CC24E40)... Where I want it to ...
0
votes
0answers
24 views

returning id's from spatial query

I am doing a spatial query to see if water sensors exist or not in a database. If so I want to return the unique identifier # that exists on the ones in the database so I can match it to the ones ...
2
votes
1answer
51 views

algorithm to get the nearest line segment (link) to a point

What is the fastest algorithm to get the nearest line segment to a point (that is not on any line segment) in a GIS database?
2
votes
1answer
37 views

How to create lines from coordinates?

I have a data table about national bus lines, with timestamps, vehicle IDs, line IDs (which line the bus is moving on), and coordinates(geom). I can add my points to QGIS on show them on OSM, but I'd ...
1
vote
0answers
22 views

Does Cassandra support GIS operations? [duplicate]

We are trying to build out stack on top of geo-spatial data, this means storing more than 10000records per a second. we are using Storm to accelerate receiving the data, but we would like to use some ...
1
vote
1answer
67 views

Create hex grids over a layer

I have a shapefile that has the outlines of the United States and I want to create hex grids that over that layer. I tried using this function that will create hexes over a layer. I created an empty ...
2
votes
2answers
66 views

How to find the closest segment to a point

I am trying to find the closest road segment to a point that I have and return an attribute from the closest segment to the given points. I know in PostGIS I need to use ST_ClosestPoint, ...
1
vote
0answers
31 views

Automatically generating raster maps (from OSM) for areas bounded by polygons?

In order to create walking lists for a volunteer campaign I have used qgis to draw polygons over groups of addresses. These are irregular areas, so I've used postgis's ST_ENVELOPE function to ...
2
votes
1answer
40 views

OSM update without loosing own additional data

I have added data (e.g. name keys) to my OSM PostgreSql database. How can I update my database without deleting or overwriting this data? In other words, how can I merge newer OSM data to my existing ...
3
votes
1answer
100 views

ST_Project vs ST_Segmentize Postgis

I noticed some inconsistency on geographies between ST_Project and ST_Segmentize in postgis when dealing with trying to segmentize over very long distances (around 18000-19000 km) Below are two ...
0
votes
0answers
23 views

Visualize the spatial queries [duplicate]

Is there a plugin or a software where I can visualize my spatial queries from PostGIS? I remember I have used something similar to this in the past for the Oracle database but I can not recall the ...
1
vote
0answers
24 views

Operations in 3DCityDB [closed]

I am working with CityGML model, I've already put it in the 3DCityDB(postgres/postgis). What I need to know is, how to make a basic operations e.g. spatial join with some another layer etc. I know it ...
2
votes
1answer
60 views

Improve performance of a PostGIS st_dwithin query

I am doing a local statistic, similar to the the one described in an earlier question / answer: SELECT a.tree_id, a.species, avg(b.age) as age_avg, count(*) as samples, a.geom FROM trees a LEFT JOIN ...
1
vote
3answers
58 views

Intersection of 2 Linestrings (not interpolated)

I am struggling with a query in POSTGIS I want to find linestring geometries where the geometries are containing the same point. I don't want to calculate the intersection points. I only want to ...
1
vote
0answers
14 views

Prepared statements and MULTILINE geographies [closed]

I'm working on a web application that parses GPX files and enters the contents into a database as Geography objects. Seeing how incoming files can be potentially insecure, I was hoping to use prepared ...
1
vote
0answers
25 views

Nearest neighbor POSTGIS in FME

So I have an attribute and I want to find the nearest neighbor but the issue is that the memory of the server may not be able to handle the use of all the FME transformers. I need to take records out ...
1
vote
0answers
41 views

POST (OL3-->Geoserver 2.8.1-->PostGIS 2.2)

I have a problem with post. Here is code OL3. (multi platform hybrid app - cordova) var point = new ol.geom.Point([18.25, 49.83]); var feature = new ol.Feature({ geometry: point }); ...
1
vote
1answer
59 views

Editing polygons in postgis layers

I am using qgis to create polygons in a postgis layer. I can create polygons and save them without a problem, but I am unable to delete them or use the node tool to reposition the points of existing ...
1
vote
1answer
31 views

How do I create a polygon from a buffered point?

I have a point and buffered it using st_buffer. How do I create a polygon geometry from that buffered point? The result of st_buffer is the polygon I need to save for future use. I will be placing ...
7
votes
3answers
258 views

Constructing Voronoi diagram in PostGIS

I'm trying to construct voronoi diagram from grid of points using modified code from here. This is SQL query after my modifications: DROP TABLE IF EXISTS example.voronoi; WITH -- Sample set of ...
0
votes
1answer
43 views

Get the intersection of a polygon with a generated buffer in postgis

I have two tables. One has points in EPSG:4326 and the other one has polygons also in EPSG:4326. I loaded these two as layers in geoserver and show them using openlayers (as shown in image) Now I ...
1
vote
1answer
134 views

Import GeoJSON into PostGIS

I want to import GeoJSON avaliable in the following dump into PostGIS but I am not able to import it. I already imported geousa data available in this public dump into MongoDB smoothly. Let me know is ...
3
votes
1answer
171 views

PostGIS with VPN

Is it possible to use the postgis database with a VPN tunnel? The database tells me there is no connection possible. I'm using VPN Tracker 365.
2
votes
0answers
27 views

Overlapping line aggregation+trim in PostGIS, while summing values

I'm sorry for the vague title, I didn't really know how to name this. I am working on a project that visualizes and simulates 17th century trade. For this project we also use so called Minard lines to ...
2
votes
2answers
70 views

How to select 200 random points within a 100m radius in Postgis

I'm currently learning to use PostgreSQL and PostGIS. I would like to know how to write the SQL that would allow me to select 200 random points within a radius of 500m from a user defined centre ...
1
vote
1answer
54 views

Can we limit the search range of geocode() function in PostGIS Tiger Geocoder?

I found the server with only 2 states data loaded is much faster than the server with all states loaded. My theory is bad formatted address that don't have a exact hit at first will cost much more ...
1
vote
1answer
133 views

Custom tile server - how to create a layer using Mapnik and mod_tile using POSTGIS db

I have created a Ubuntu 14.04 tile server. I loaded an OSM base map into the POSTGIS database and created a slippy-map using OpenLayers 3.9. Then I loaded data of an overlay into the POSTGIS database ...
1
vote
1answer
49 views

postGIS, length, area, density of line network

I am trying to figure out the length and density of all major roads and minor roads within a study area to return something like: ...