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

learn more… | top users | synonyms

0
votes
0answers
19 views

Error on ST_UNION: SSL SYSCALL error: EOF detected

I'm using Postgres 9.4 and PostGIS 2.1. I have a table that looks like this: wkb_geometry | geometry(Polygon,4326) | id | integer | county | character varying | ...
0
votes
0answers
37 views

Using pgRouting through PostgreSQL

I followed the guideline from this tutorial to use pgrouting through PostgreSQL but I can't understand the first instruction: CREATE OR REPLACE VIEW road_ext AS SELECT *, st_startpoint(the_geom), ...
0
votes
0answers
21 views

Can you merge GeoJSONs in PostGIS?

I'm not too familiar with the GeoJSON functionality in PostGIS. In essence - I'm having problems with the computation of ST_AsGeoJSON(ST_Union(g)) taking too long for large g. Is it possible to ...
0
votes
0answers
26 views

Handling empty PostGIS geometries with GeoServers Pregeneralized Features extension

I've setup my GeoServer instance (2.8.2) with the Pregeneralized Features extension to serve several large polygon layers from PostGIS (9.3), and while it is working I am still experiencing remarkably ...
0
votes
0answers
17 views

multigtfs and pgr_createTopology

Could anyone know how to create a Topology on imported GTFS data into PostGIS with multigtfs? In fact, pgr_createTopology needs the edge_table or network table. Here are tables obtained after the ...
0
votes
0answers
28 views

pgrouting floyd-warshall with spesific start & end

I'm implementing floyd-warshall algorithm for the shortest route in the road network using pgrouting plugin. how to determine the specific start and end points?
0
votes
0answers
30 views

How cut multilinestring by 2 points on postgis?

I know how cut linestring by 2 points, easy: ST_LineLocatePoint,ST_LineSubstring. But i have unmerged multilinestring, few lines are not connect?
0
votes
0answers
36 views

Are there any addresses that straddle two or more congressional districts?

I'm using a shapefile of TIGER data provided by the Census Bureau for locating an individual's congressional district. In PostGIS I'm running an ST_Intersects query in order to take a (lat, long) ...
0
votes
0answers
51 views

How can I add the PostGIS extension?

I'm experiencing difficulties when trying to add the PostGIS extension to PostgreSQL. I wasn't able to add the extension during the installation because of an error. Now I'm trying to add the ...
0
votes
0answers
55 views

Union geometries from multiple tables

I need to create a "total" polygon by merging together all the geometries from about 10+ tables into one big polygon. For a test with just 2 tables I tried ST_UNION and ST_COLLECT, the result was ...
0
votes
0answers
19 views

Using the raster function ST_Clip?

I am using Postgis Raster in POSTGIS 2.1.5 on PostgreSQL 9.4.5 on Ubuntu 15.04 32-bit system. I using ST_Clip to clip a huge number of GeoTiff Files by the geometry field of another POSTGIS table. In ...
0
votes
0answers
46 views

Retrieving postgis image to nodejs?

I am trying to retrieve a PostGIS image generated with ST_AsPNG to nodejs-pg-promise then put it to respond. I have achieved the PostGIS side, but have failed on putting the resulting image to ...
0
votes
0answers
26 views

Using pgsql2shp in server code with PostGIS installed on Amazon RDS instance

I've created a web application using the Meteor web framework, GeoServer and PostGIS. I've deployed my app on Amazon Web Services with the Meteor app and GeoServer running as 2 separate tasks on 1 EC2 ...
0
votes
0answers
33 views

ogr2ogr - PostGIS to GML with nested attributes

I am attempting to create GML from PostGIS tables and having issues with nested tags. Before I waste too much time on this, I would like to know if what I am trying to do is possible with "ogr2ogr". I ...
0
votes
0answers
20 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) ...
0
votes
0answers
37 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
0answers
69 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 ...
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 ...
0
votes
0answers
52 views

How to deal with different projections in PostGIS spatial analysis?

I am doing something wrong, but try as I may, I can never seem to grasp all aspects of how to project layers in GIS. I am working with two files: 1) The USGS maintains a list of locations with ...
0
votes
0answers
84 views

GeoDjango: Insert geography coordinates and filter the nearest points, step by step

I would like to: Save pairs of srid 4326 (latitude, longitude) points in a PostGIS Geodjango 1.8 Database. (Maximum distance between the edge points: 2.000km) Given a srid 4326 (latitude, longitude) ...
0
votes
0answers
41 views

SQL script for postgis column name with colon

I have an sql script that creates some tables from the default planet_osm_point, planet_osm_line, planet_osm_polygon tables which are created with the osm2pgsql command line tool. DROP TABLE IF ...
0
votes
0answers
40 views

Moving a marker along a WFS road layer

I have WMS base layer and a WFS road layer published from PostGIS database using GeosServer and Openlayers. The two layers are displaying fine on the map. How can I move a marker along the road like ...
0
votes
0answers
15 views

PostGIS Tilemill subquery

I need to find a way to merge ways into one long lines with the same attributes. I heard I can use st_union but I don't know how. I have a postgresql data base connect with tilemill. It works fine but ...
0
votes
0answers
21 views

Insufficient permissions: The project file not is writable?, QGIS

I have QGIS-server running, with PostGIS-layers in my project. When making changes I can´t save them. The above log comes up? How come? Normally it works fine.
0
votes
0answers
55 views

How to correct this error Caused by: java.lang.ArithmeticException: / by zero in geoserver

My environment is: geoserver 2.8.1 image mosaic JDBC java 1.7.0_79 centos 6.7 postgresql 9.4.5 postgis 2.1.8 I used ImageMosaicJDBC to publish my tiff image in geoserver. But, I get the error ...
0
votes
0answers
58 views

Tile server and postgis db with OpenSeaMap data, how to render icons?

I am trying to build a tile server in a windows machine with the OpenSeaMap data. I set up my postgresql database and populated with the world.osm data (OpenSeaMap data) and the water polygons. I ...
0
votes
0answers
96 views

How to find a polygon from coordinates provided

I am really new with PostGIS, and I need to find a polygon providing (lat - long) coordinates. My goal is, get the coordinates x and y passed by parameters, and find the polygon which where this ...
0
votes
0answers
33 views

Installing Osm2Pgrouting on debian?

I'm new to Postgis. I'm trying to install osm2pgrouting on debian, but when I run cmake -H. -Bbuild I get an error : Could not find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found version ...
0
votes
0answers
64 views

Modifying an algorithm in pgRouting or creating a new routing algorithm [PostGIS using OSM Data]

I am currently making a routing application that uses pgRouting, PostGIS and OSM Data. Everything works fine but I discovered that the Dijkstra algorithm in pgRouting should be tweaked a bit to be ...
0
votes
0answers
51 views

Mix Public Transportation data with pgRouting

I'm looking to mix 3rd party data, such as public transportation (routes, schedule is optional), with geographic data imported from shapefile/osm. With this I plan to give users an option to select a ...
0
votes
0answers
53 views

Unable to install pgrouting for postgres 9.3.5/postgis 2.1.7

I am running postgres 9.3.5 and postgis 2.1.7 on Ubuntu Server 14.10. I am trying to install pgrouting, but having no luck. 1) I tried the following based in the official workshop documentation: ...
0
votes
0answers
54 views

populating a geojson from postgresql with php depending on zoom level

i am about to load a few thousand polygons (a grid 500x500m) from a postgresql db into a leaflet map with php script converting the data into a geojson. the php script populates the geojson depending ...
0
votes
0answers
73 views

How to “INSERT” geotiff raster into postgresql/postgis table using psycopg2

Can someone walk me through how to insert a raster into a prebuilt postgresql table? The table has the postgis extension and I've been able to manually insert a geotiff using raster2pgsql, but I would ...
0
votes
0answers
40 views

How to not display a layer, if its below a other semi transparent layer?

I have two polygon layers (PostGIS). One of them is semi transparent. If the other layer is below the semi-transparent one, it should not be displayed. My situation at the moment is: The grey ...
0
votes
0answers
43 views

Replicate routing behavior

I've been dealing with problem for a while now and I want to know if I'm in the right track, basically I want to replicate this site functionality and so far I think it can be done with pgrouting ...
0
votes
0answers
65 views

Interpolate missing M values along a line

Is there some way in PostGIS to interpolate missing M coordinates in a geometry like this? select ST_MakeLine(ARRAY[ ST_MakePointM (0, 1, 10), ST_MakePoint (0, 2), ST_MakePoint (0, ...
0
votes
0answers
46 views

Select points greater than a certain distance from related points based on shared foreign key id

I have a PostGIS-enabled PostrgeSQL db, using QGIS, with data using EPSG:4326, and projected as EPSG:29903. I have a table with points with pk point_id and a table with images with fk point_id. I want ...
0
votes
0answers
44 views

pgRouting adding point or line barriers

In pgRouting can we add barriers (point, line, polygon) to avoid using a road partially not entirely. For example we have point features in another table. Or line features which is sub-part of a ...
0
votes
0answers
50 views

Clipping raster without create new table in PostGIS?

I'm learning about PostGIS, and I would like to create a SQL to cut a raster with a shapefile to work in my R program. I managed creating a new table, but I would like build it without a new table. ...
0
votes
0answers
59 views

pgsql2shp result as shapefile

In addition to pgsql2shp command join error, the next command line works fine in order to join a table to a shapefile but the result is a dbf table and not a shapefile as I want. I see that exists a ...
0
votes
0answers
50 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 ...
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 ...
0
votes
0answers
31 views

Space Efficiency - Geotiff File VS Postgis Raster

Is it more space efficient to store a raster as a geotiff file on disk or directly in Postgis? I ask because I currently have a large number of rasters stored in a Postgis database and I want to ...
0
votes
0answers
34 views

Different pixel values for a raster between QGIS and PostGIS

I have inserted a Landsat raster into PostGIS using the command : raster2pgsql -I -C -s 28356 -M -t 100x100 /data/LS7_20150425_B40.tif public.red | psql -d postgres -U postgres Using QGIS, I have ...
0
votes
0answers
51 views

Filtering out of bounds' coordinates

I have a set of coordinates, that I receive from GPS. I store them in database, its geometry is 4326. I am using the next query to calculate the travelled distance: ...
0
votes
0answers
83 views

FME autoincrement id is not recognized

I have made a workflow in which I pass some data from a shape file to a postgis database using FME 2015. The table in the database has several columns and one of them is an id with an autoincrement ...
0
votes
0answers
69 views

Importing array directly as raster to PostGIS in memory?

Below is python code I wrote to import downloaded rasters into a postgis table using raster2pgsql. I have a question involving efficiency. Instead of writing the raster to disk after doing array ...
0
votes
0answers
42 views

WFS to PostGIS with Geokettle

I am trying to use Geokettle to write records to PostGIS. Geokettle has has a WFS input step. I cannot get it to work, I cannot find much documentation about it and I wonder if anyone here has used ...
0
votes
0answers
71 views

PHP, PostGIS & Geojson

I'm using Lumen to connect to postgis and I want to execute this query: WITH query AS (SELECT ST_GeomFromGeoJSON('{"type": "Polygon","coordinates": [[[366063.228612569917459, ...
0
votes
0answers
39 views

postgis ST_Intersect on 2 valid geometries throws TopologyException

Using Postgis 2.1 on PostgreSQL 9.3.4, I'm getting an error when I try to intersect two valid geometries: TopologyException: found non-noded intersection... These geometries are created on the fly ...