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

learn more… | top users | synonyms

1
vote
0answers
23 views

PostGIS: Compute isovist

I'm using PostGIS with OSM table of buildings. How can I compute isovist from single location point while only the buildings (represnted as geom's) are the obstacles. Thanks,
1
vote
0answers
11 views

Shapely's object.project method dealing with overlapping polyline

So I am interested in knowing how far along a polyline a given point sits. Python's shapely package has a method to do such a thing, see the below code: from shapely.geometry import LineString ip = ...
1
vote
0answers
27 views

need to split some linestrings by points

please help me, i'm new in gis 1) i have а table with geom railways, which are multilinestrings (for example there are 2 ways one of which is interrupted, so this way will be multilinestrings ...
1
vote
0answers
14 views

Missing XML Attributes in Geoserver

I've imported a number of files that used to be in KML format into geoserver after putting everything into a PostGIS table. Now I would like to use CSS style information that was associated with the ...
1
vote
0answers
34 views

Running a custom function on each line of a PostGIS table

I am trying to run a custom function on each parcel in a PostGIS table, (in this case its a function that finds the standard deviation value of the pixels intersecting a raster) Here is the code for ...
1
vote
0answers
19 views

Indexing PostGIS table by tile boundaries

I have a PostGIS table with 2M rows, all Points. I'm creating tiles from the data, but it's quite slow. Although I have the normal geometry indexes enabled on the table, I wonder if it's possible to ...
1
vote
0answers
33 views

What solutions to use QGIS as insert tool for a Postgres relationnal database?

I have a Postgres/PostGIS relational database and I would like to use QGIS as an interface for inserting data. The thing is that my database is quite complex and I need my tool to handle the following ...
1
vote
0answers
14 views

Postgis ST_AsSVG renders a tiny SVG

I am storing information about a person's journey as a linestring. Having recently discovered ST_AsSVG I tried the following query: SELECT ST_AsSVG(path) FROM activities WHERE id = 209 ...
1
vote
0answers
24 views

Unable to load Postgresql spatial data in R (with rgdal)

I'm trying to load spatial data from a postgresql database in R, using functions from the package rgdal, but I'm having trouble getting the functions to work. For example, when trying to read a ...
1
vote
0answers
38 views

Is it possible to perform spatial join in PostGIS and keep all features?

I am attempting to create an employment change map using a hex grid. I have individual establishment data as points with attached employment figures. When I ran the spatial join using the postGIS ...
1
vote
0answers
39 views

How to install PostGIS shp2pgsql-gui on openSUSE 13.2?

I installed PostgreSQL 9.4.4 together with pgAdminIII (1.20.00) and the PostGIS extension (2.1.7, via the Stack Builder) from http://www.enterprisedb.com/products-services-training/pgdownload on my ...
1
vote
0answers
29 views

how to create Topology table?

i have gis database called Madar in pgadmin with postgis and pgrouting extension, all the data inside gis database already inserted by shp2postgre tool , what i really need now is how to make topology ...
1
vote
0answers
28 views

PostgreSQL default values in QGIS 2.8.2

I think the issue outlined in this question PostgreSQL default values in QGIS 2.8.1 and ticket #12391 is not fully solved yet. Negative numeric default values, and dates are not used by QGIS 2.8.2 ...
1
vote
0answers
18 views

Enable 3D viewer in geo explorer-geo server

I am trying to enable 3D viewer(google earth) in Geo explorer-geo-server by installing google earth plugin but doesn't work . any ideas ?
1
vote
0answers
54 views

PostGIS: intersection of a polygon with 2 rasters

I'm trying to get the intersection of a Polygon with 2 raster layers in PostGIS. The rasters have the same size and pixel size and I'd like to retrieve for the polygon a list of something like that: ...
1
vote
0answers
50 views

raster2pgsql error

I am attempting load ~500 rasters in a PostGIS table. They are .Hdr/.dat files. I am using raster2pgsql. I am able to load the first 260 rasters, but the remaining rasters fail with the following ...
1
vote
0answers
41 views

What is the fastest way to select oldest, unique geometry from a table containing duplicates in PostGIS?

I have an output from an ArcPy arcpy.Union_analysis operation and for the overlap polygons that were created I need to select out the oldest feature (along with the attributes). The result is 75740 ...
1
vote
0answers
13 views

Recentering a tiled raster table in PostGIS?

Does anyone know a nice and easy way to recenter a tiled raster table in PostGIS? By recentering I mean that I have a raster that is centered on the Pacific, but I need to recenter it on ...
1
vote
0answers
19 views

Mirrored shape in postgis

I'm troubling with save of shapes in db. The shapes are steel sheet cuts, with may be holes, therefore are collections. I decided to solve to my self the problem, to allow the easy exportation between ...
1
vote
0answers
37 views

Optimize PostGIS query, ST_Intersects - Raster and Geom

I am trying to run a spatial query between two tables. Table one (prism_ppt_monthly - see below for details) is monthly precipitation data. Table two (usgs_basin_boundary - see below for details) are ...
1
vote
0answers
41 views

Make a line from a set of GPS points close to a specific GPS point with PostGIS

I have to develop a map-matching algorithm. At the moment I only match GPS points with the closest road segment. I'm looking for a way to compare the directions between a GPS point and a road to ...
1
vote
0answers
66 views

Creating quadtree index on latitude, longitude data in PostGIS

I have a table of locations in which one of the columns represents the lat-long for the location. These coordinates have been extracted from the OpenStreetMap file. How can I create a quadtree index ...
1
vote
0answers
23 views

How does `ST_Union` treat NULL values in a raster?

My question is about how ST_Union of rasters containing NULL values are handled. For example suppose I have two rasters that intersect but the values of the intersection are NULL in one of the ...
1
vote
0answers
81 views

Help serializing a postGIS query to geojson

I have a query which I would like to serialize to geoJSON: select article_title, pub_date, city, geom from article, location where article.id = location.id; I can serialize the geom field easily ...
1
vote
0answers
30 views

Merging DEM files using PostGIS

I have several DEM files and I want to merge them to create a mosaic. I found the St_Union(raster) or St_MemUnion(raster) functions but I don't know how to use them. Are there any other solutions?
1
vote
0answers
55 views

OSM Bright Cartography XML

So I've successfully setup a tile server as described here: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/ What's troubling is the lack of clarify surrounding OSM Bright ...
1
vote
0answers
32 views

Displaying multiple features from a geoserver layer with time and style in a KML

I have 4 datasets organized in a PostGIS database each of the same geometry and location except they are at different times. They each have a corresponding datetime field. I can load these into a ...
1
vote
0answers
23 views

Selecting all pixels above a given value in a raster in PostGIS

I have a raster with one band whose value represents the date of the occurrence (a sequential integer). This raster file gets updated regularly, and each time that happens, I need to run a process ...
1
vote
0answers
112 views

Rendering TopoJSON in Leaflet from GeoJSON PostGIS output?

I'm using the query found here SQL query to have a complete geojson feature from PostGIS to get a geojson that I can display on a leaflet map. However, the amount of data is kinda big and the ...
1
vote
0answers
34 views

Merge raster tiles in PostGIS

I have several raster tiles that are adjacent and non-overlapping, so they form a mosaic. I am trying to merge two adjacent rasters using PostGIS but am getting an error that they do not have the same ...
1
vote
0answers
43 views

OS Terrain 50 into Postgresql/PostGIS for lat/long analysis

I am performing analysis using line of sight's and followed a very useful blog post at http://davidrowley.blogspot.co.uk/2013/08/calculating-line-of-sight-with-postgis.html which detailed how to load ...
1
vote
0answers
28 views

Export only one value from a one-band raster

I have a PostGIS database with a georeferenced raster, with one band which contains values from 0 to 255. I should export it to a transparent GeoTiff picture in which the only visible pixels are those ...
1
vote
0answers
16 views

PostGIS TIGER reverse_geocode() returns state only

I have a clean install of PostGIS 2.1 in Postgres 9.3 on Ubuntu, using apt-get and postgres extensions. Ran the data loading scripts from here. normalize_address works well, but geocode returns no ...
1
vote
0answers
95 views

Export to shapefile error in QGIS from POSTGIS table

I am attempting to export a postGIS layer to a shapefile in QGIS 2.6.1 Brighton. The table has 244,674 rows. The data displays perfectly well in QGIS but when I attempt to export to shapefile I get ...
1
vote
0answers
60 views

Loaded OSM Data into PostGIS Database. Cannot view in ArcMap “The coordinate system identifier is invalid”

I loaded OSM File for Pennsylvania into a PostGIS Database in PostgreSQL using osm2pgsql. Everything seemed to go without a hitch until I finally connected to the Database in arcCatalog and tried to ...
1
vote
0answers
27 views

How to fix broken geometry after joining features in PostGIS

I have a PostGIS layer I'm serving over GeoServer. It looks like this. Im using the PostGIS query to get a new layer with some grouped features: SELECT id, name, st_union(st_buffer(geom, ...
1
vote
0answers
45 views

suitable column Data-type for geojson data storage and processign in PostGis

I have a MySQL table with 2 columns, id, a unique geometry id, and GeoJSON stored as a varchar, eg, {"type": "Point", "coordinates": [116.4, 45.2, 11.1]} ...
1
vote
0answers
48 views

set Default projection in postgis table

I've set the SRID 4326 for a table having geometry column, but when i insert a geometry without SRID, i get an error because no SRID specified is interpreted as -1 or 0, so how i can set a default ...
1
vote
0answers
59 views

Calculate total line lengths within a polygon?

I have basically the same conundrum as How do i calculate line segment lengths within a polygon? but I'm working in PostGIS, not ArcGIS. Any pointers? This query seems to like it should work, just ...
1
vote
0answers
152 views

How to import country administrative boundaries from OSM Planet to PostGIS Polygons

I need to import all world countries as polygons or multipolygons into PostGIS. Specifically, I need the administrative boundaries that are like this orange bubble around the actual land borders. ...
1
vote
0answers
73 views

PostGIS Geography data type not displaying in QGIS

I am trying to display data held in the PostGIS Geography type on a map in QGIS. Whatever I do I can't get it to work. Here is the SQL that creates my data - a single point in London. CREATE TABLE ...
1
vote
0answers
52 views

Mapnik performance - large polyline dataset

I'm working with a very large set of polylines - contour data - to be rendered with Mapnik. (The contours are generated using gdal_contour from SRTM data.) At present I'm storing them in PostGIS and ...
1
vote
0answers
26 views

Geoserver - How to make a psql-backed timestamp that uses timezones

I'm working on an application that extends geoserver and am frustrated as I'm trying to define a SimpleFeature that has timestamps that include timezones. I've tried declaring my timestamp field ...
1
vote
0answers
62 views

PostGIS is not seeing any GDAL drivers

I've tried setting POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL as an environment variable. As well as running SET postgis.gdal_enabled_drivers = 'ENABLE_ALL'; from psql. (With a pg_ctl restart after each) ...
1
vote
0answers
105 views

Is geotools transformation of EPSG:3785 (Web mercator) to EPSG:4326 wrong?

Using postgres (9.3.6) and postgis: select st_astext(st_transform(ST_GeomFromEWKT('SRID=3785;POINT( 7550310.77 4139679.02 )'), 4326)); This returns POINT(67.8255956454323 34.8217133646348) Using ...
1
vote
0answers
67 views

Calculate surface map from PostGIS

We need to create surface maps from the website. The data is stored on PostGIS (2.1) as a table of Point geometries with a field indicating a thematic value. The optimal solution would be to produce ...
1
vote
0answers
70 views

Is there PostGIS equivalent to arcpy.sa.Slice() function?

I have an existing system built on an 8.3 PostgreSQL database which uses a ArcGIS - Spatial Analyst for a couple of raster operations. The system is moving to PostgreSQL 9.2 and I'm evaluating if the ...
1
vote
0answers
76 views

PostGIS: Ordering by the sum of two distances

I have an SQL statement that selects possible bus routes between two points, ordered by the walking distance required from the start point to the departure bus stop (distance1) and the arrival bus ...
1
vote
0answers
157 views

Import KML file into GeoDjango

I'm trying to import a KML file into an existing GeoDjango app (using a Postgres 9.3 database). This is my Django model: class PCT(models.Model): code = models.CharField(max_length=3, ...
1
vote
0answers
70 views

PostGis without shp2pgsql

I recently reinstalled postgis on my pc, following these instructions link. The installation is successful, and for several days work using PostgreSQL and PostGIS without problems. Now, I need to ...