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

learn more… | top users | synonyms

2
votes
1answer
335 views

PostGIS: ERROR: lwpoly_from_lwlines: shell must have at least 4 points

I have achieved to close lines in order to build a polygon with: st_addpoint( st_makeline(geom ORDER BY .cd_noseq), st_pointn( st_makeline(geom ORDER BY cd_noseq), 1) ) but ...
0
votes
1answer
31 views

Spatial query ST_CONTAINS returns empty result

I want to create a database view in Postgres/PostGIS which returns a subset of the points stored in another table called locations. The subset is defined by an area stored in yet another table called ...
0
votes
0answers
29 views

Enable PostGIS extension on Ubuntu 14.04.2

I have troubles enabling PostGIS extension on Ubuntu 14.04.2 and PostgreSQL 9.3. I have installed the packages with this step by step procedure. PostgreSQL and pgAdminIII seem to be installed ...
8
votes
0answers
116 views

Point sampling along a pole-wrapping coastline with PostGIS

I am working on a task that requires me to get sample points every 1000 km along coastlines, and have run into a problem with Antarctica. From what I can tell, it seems to be an issue with the use of ...
10
votes
2answers
197 views

How to create dynamic leader lines?

I'm trying to create dynamic leader lines by using a PostGIS view in addition to the QGIS „Move Label“ tool. CREATE VIEW leader_line AS SELECT gid, ST_MakeLine(geom, ...
6
votes
0answers
56 views

Best way to cut linestrings with points

i was checking the best way to cut linestrings by points. The scenario is: lots of streets, need the segments cut by intersect points, kind of this: I got linestrings (full uncuted by points) ...
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 ...
2
votes
2answers
158 views

Map-matching GPS points to the road network!

I am quite a newbie in Postgres and Postgis so please be simple and clear :) I am trying to do a simple map-matching (or path-inference if you wish) of some GPS points. I am using postgres(postgis). ...
0
votes
1answer
18 views

How to set the target schema using osm2pgrouting

Is it possible to set the target database schema using osm2pgrouting? After some debate and troubleshooting, I've decided to host my OSM-based pgRouting data in the same database as the rest of my ...
1
vote
2answers
507 views

How to get the geometry type of an empty PostGIS table?

I have a web application that needs to know the geometry type of a PostGIS table's geom field before inserting rows into it. I use the following query to determine the geometry type of the geom ...
0
votes
0answers
47 views

PostGIS ST_Contains query return empty

Hopefully I explain this properly. I am trying to check if a route falls into another route I have created. The route is saved as a linestring. My search query is: SELECT id FROM routes WHERE ...
0
votes
2answers
547 views

Select points from a table that exist in a custom polygon

We have a property search site where the user draws a polygon on a map and then the app displays all properties that fall within the polygon. We have properties stored within a Postgres table that ...
2
votes
1answer
2k views

spatial query st_contains postgis

This seems too simple to be asking this but I am really new to PostGIS/Postgres have been going around in circles with this. I am performing a really simple spatial query where I would like to make a ...
0
votes
1answer
188 views

Shp2pgsql - exec() not allowed on external server

Me and my collegue are using the shp2pgsql and psql commands in php code (a Drupal module to be precise). We put these commands in a php variable and use the exec() command to execute them. This ...
3
votes
3answers
128 views

Spacing a set of points

I have a shapefile of a set of points that I want to space out. I DO NOT want to do this using line interpolation as I run the risk of placing a point where there wasn't one before. I can load this ...
1
vote
1answer
63 views

How to update the OSM data in a PGRouting Database built with osm2pgrouting?

I'm using a PGRouting database originally built with osm2pgrouting from a *.osm file downloaded from Mapzen. If I want to update the OSM data in that database, ie. re-build my PGRouting Database, ...
0
votes
0answers
21 views

Return nodes along portions of edges with pgrouting

I have been experimenting with generating isochrones with pgrouting using osm data. So far, I have been able to generate isochrone polygons by getting the concave hull of the nodes returned from the ...
1
vote
1answer
251 views

Convert native box to geometry

I have an old table that contains bounding boxes of lat long coordinates in a "box" type. How do I convert them to PostGIS geometry ? I tried using ...
0
votes
1answer
20 views

Tweaking the table after shapefile import?

I'm importing shapefiles to Postgresql with the shp2pgsql command line tool. shp2pgsql -s 3035 -W "latin1" foo.shp | psql Should I do some table (SQL) tweaks after that? Or is the import fine after ...
0
votes
0answers
32 views

Cannot find information about my.table table in raster_columns

I am running PostgreSQL 9.4 and PostGIS 2.1 and have loaded a small piece USGS SRTM data for North America successfully into my database. I am attempting to export a small piece of of the rasters I ...
4
votes
0answers
46 views

How to speed up simultaneous working with PostGIS layers in QGIS?

we are working on one big layer at the same time (10-20 people). Some of us use QGIS 2.8.1 and the other 2.6. The user with 2.8 have a lot of crashes (QGIS). The 2.6 users don't have this crashes but ...
8
votes
1answer
101 views

Building a polygon over a reachable area

I am currently working in the field of isochrones and the underlying algorithms. What now causes problems is not the calculation if the isochrone itself, but the visualization of the results. The ...
2
votes
1answer
299 views

Geoserver configuration for large layers

I'm having problem with geoserver configuration. Currently I'm running geoserver 2.4 on CentOS and Tomcat 6 with 24 cores CPU and 48 GB RAM. I have uploaded 4 layers to PostGIS (PostgreSQL 9.3/PostGIS ...
1
vote
0answers
27 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 ...
2
votes
2answers
63 views

PostGIS spatial view getting points within distance interval from line

I have a point table (addresses) and and line table (coastline) in PostGIS. I would like to build a spatial view selecting the points that's has a minimum distance of 600 meters from the line and a ...
0
votes
0answers
43 views

PostGIS ST_Intersects not returning values

I recently installed the PostGIS extension for a rails app that i'm working on. Currently, i am trying to get all the polygons that intersect the vieport of the Google Maps. On running the (see ...
3
votes
2answers
3k views

PostGIS installation on Ubuntu 10.12 (Amazon Services)

On Ubuntu 10.12 (AMI on Amazon), I use aptitude to install Postgresql and PostGis. On terminal running psql interactive prompt, I type CREATE EXTENSION postgis and ERROR: could not open extension ...
1
vote
2answers
97 views

Adding PostGIS query layer says Query class name is invalid?

I am having issues with adding postgis query layers in ArcMAP 10.2.2.3552, not doing anything special just adding a layer, this works in 10.2.1 so I don't know if its a bug or something Also this ...
0
votes
0answers
65 views

Problem with ST_IsValid: Unknown geometry type: 9 - CompoundCurve

The following is an example of a gml:Curve that was loaded into Postgres using FME. <gml:Curve srsName="urn:ogc:def:crs:EPSG::27700" gml:id="os.vmd.ny.38124.geom"> <gml:segments> ...
4
votes
2answers
668 views

clustering points in postgresql to create contour map

UPDATE: To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other ...
2
votes
1answer
421 views

Using ST_MakeEnvelope over the dateline

I'm using ST_MakeEnvelope in PostGIS to try and make geometries that cross the international dateline, but they are making a shape that wraps the other way around the globe. The geometry I want is ...
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 ...
0
votes
1answer
61 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 ...
0
votes
1answer
28 views

PostGIS ST_Buffer a polyline?

I am trying to run a buffer around a polyline (geography). My first attempt below (based on ST_Buffer documentation: SELECT ST_Buffer(ST_Geomfromtext(i30.geog),10,'endcap=round join=round'); gives ...
3
votes
1answer
145 views

Map-server Very Weak Performance Vs Geo Server - Why?

I search for a good wms server that support Postgis at the end I found Mapserver as the fastest and best choice. Every performance test say it's faster than Geoserver because of its native compiled ...
0
votes
1answer
224 views

ST-Links convert Feature Class to DB Table error

I'm using ArcMap with the ST-Links SpatialKit Conversion tool to convert a Feature Class to a DB Table. But I'm getting an error: ERROR: 42601: type modifier is not allowed for type "geometry". I ...
2
votes
1answer
48 views

Get nearest node following segment

I am trying to get the nearest node from a point(Id 1) . The coordinates (lat/long) are input by an user . I am using some functions like pgr_nearest_node() or get_nearest_node() from get_nearest_node ...
2
votes
2answers
107 views

Is there a PostGIS function to get a tangent and normal line?

I'm looking for a function that will return a tangent (and normal) for a LINESTRING in PostGIS. I think this is the 3rd time I've come across the need for this function and everytime, I end porting ...
2
votes
1answer
74 views

Finding census block for given address using Tiger geocoder

I have a geocoder based on Tiger/Line data running on PostGIS. I need to find census block for a given address. How can I do it? Like I can do for census tract: SELECT get_tract(ST_Point(-71.101375, ...
0
votes
0answers
37 views

How to reconstruct a network with multipart edges to a network with singlepart edges

I have a network shapefile that between its vertices , there are edges that have multiple geometric objects. When I try to node it in postgis, it creates multiple segments in the database that ...
0
votes
2answers
57 views

Index a Table with Geometry Column

I have a table called Stores with 10k rows which has a column location geometry(Point,4326). CREATE INDEX "Stores_spatial_gix" ON "Stores" USING gist (location); Upon KNN query explain analyze ...
1
vote
1answer
168 views

OpenGeo Explorer for QGIS 2.6.1 - No module named ogr2ogrtopostgis

I'm trying to use the OpenGeo Explorer plugin for QGIS (v2.6.1) to import shapefiles to my PostGIS database. I can connect to the server, but when I try to import, I get the following error: No module ...
12
votes
0answers
328 views

Focal Statistics for Special Neighborhood

I'm looking to calculate focal statistics for each cell of a raster, within a neighborhood of a specified criteria. Background - I have three binary rasters, each representing a single vegetation ...
2
votes
2answers
63 views

How can i update postgis data from shp?

Now,I know how to insert a shapefile to PostGIS by using shp2pgsql.exe. If I have an updated shapefile and I only want to update the updated rows, how can I know the table being updated?
9
votes
2answers
203 views

How to ST_Split features in one table by features in another?

I need to split polygons (layer 'pol') by both closed and non-closed linestrings (layer 'lin'). Unfortunately I don't get proper results running the following query. CREATE VIEW splitted_pol AS ...
0
votes
2answers
48 views

How to export query result on raster table in PostGIS

I did success query on a raster table in postGIS(raster data clipped by a vector polygon), now I want to view the query result in QGIS. But how to export the query result to another table. In vector ...
0
votes
0answers
25 views

Use of constraints and Spatial indexes in Postgis

We'are using Postgis to manage our geo data. They are coming from several sources, like Open street map, VPF, Shape and so on. We have defined constraints on the tables, and spatial indexes on ...
1
vote
1answer
143 views

Admin Sample GXP Viewer

I have Geospatial application which is using GXP, GeoServer, GeoExt and PostgisSQL. We would like to enhance the application by adding a user friendly Admin system, similar to what GeoNode has. This ...
3
votes
1answer
67 views

Live data on a web based GIS

I'm looking to implement a 3D/2D tactical display in a browser. This should be capable of plotting maybe 100 tracks and their histories with 0.5 second updates. I've researched the available ...
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 ?