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

learn more… | top users | synonyms

1
vote
0answers
9 views

Django Postgis Distance from point

I have a point where the objcet is and another point for mylocation. I want to calculate the distance >> object_location <Point object at 0x7f9ceaac7be0> >> mylocation <Point ...
1
vote
0answers
10 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
19 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
32 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
23 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
25 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
25 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
14 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
47 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
41 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
32 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
11 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
29 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
33 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
45 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
21 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
69 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
46 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
29 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
21 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
85 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
28 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
38 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
13 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
60 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
52 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
24 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
38 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
38 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
47 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
133 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
63 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
43 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
25 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
50 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
87 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
63 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
64 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
75 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
60 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 ...
1
vote
0answers
33 views

ST_Split and looping problems PostGIS

I am a total PostGIS noob, and am having trouble understanding the finer points of SQL syntax. I am trying to take a large set of line data and clip it with a polygon. I then want to create a new ...
1
vote
0answers
34 views

Tool, API of or code samples for calculating spatial similarity between Lines

I am migrating a database with a road network to an other external data provider. We have joined our own data about roadworks, temporary speed-limits, etc., using ID and linear referencing on this ...
1
vote
0answers
31 views

pgRouting. pgr_ksp() returns -1 as id3

The documentation (http://docs.pgrouting.org/dev/src/ksp/doc/index.html) says that the result should be 0 for the last row. Is the same 0 than -1? I'm new on this. Thaks for the help.
1
vote
0answers
38 views

How to display table with more than one image from postgis in mapserver?

I have 3 tif files in one postgis(2.1.5 ver.) raster table. ( load with raster2pgsql) And i have mapserver MapServer 6.1-dev. I need to display table from postgis in qgis via mapserver. P.S I trying ...
1
vote
0answers
14 views

Replicate results from JSI using PostGIS

I am using OSM and facing an issue with finding the nearest road-segments to a given lat/lon point. I have a code that uses Java Spatial Index JSI which traverses the RTree index while computing the ...
1
vote
0answers
53 views

Mapserver display empty map when i add more then 1 raster file in 1 table postgis

Here is a part of mapfile with layer and WMS: WEB METADATA wms_title "Diplom" wms_abstract "no matter" wms_onlinesource ...
1
vote
0answers
83 views

GeoServer: Get styles from PostgreSQL/PostGIS table

We're running GeoServer with all layers coming from a PostGIS data source. Most people work directly on the PostGIS database, but we have one person sitting 10.000km away, and for him, connecting to ...
1
vote
0answers
64 views

Postgis - Creating Ellipse in WGS84 with metric parameters

I have points in WGS84 (x,y), radiuses in meters (rx, ry), rotation angle in degrees. I would like to create a new WGS84 geometry. I've tried this but the major/minor distances seem to be off by a ...
1
vote
0answers
90 views

Installing PostGIS Layer Viewer for pgAdmin III

I have difficulties installing pgAdmin's plugin PostGIS Layer Viewer. The official repository on GitHub gives this Web site for install procedure, then the former site gives this Web site for ...