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

learn more… | top users | synonyms

2
votes
1answer
26 views

PostGIS GML round trip confusion

I've investigated the issue of coordinate order in GML and each time I think I've got it but I find my self confused once again. I think some of my confusion may be to do with PostGIS. Doing a ...
0
votes
1answer
47 views

Delete duplicate geometry in postgis tables

After - I dont know what happend - all my entry's in my postgis tables are doubled! I tryed that to delete them but it does not delete any/all duplicates: DELETE FROM planet_osm_point WHERE ...
4
votes
0answers
55 views

Vector to raster, then map algebra

I have a table of polygons representing travel time isochrones on particular days. For each origin point, there are five isochrone geometries (stored in separate rows). For each origin point, I want ...
3
votes
2answers
78 views

How can I smooth or resample a DEM to find steep roads?

I am trying to find sections of road with steep gradients. My process is: pull a linestring from Openstreetmap data resample it to create a point every 10 metres look up the height data for each ...
0
votes
1answer
29 views

Print button greyed out on GeoExplorer

I have recently downloaded and installed the OpenGeo Suite from Boundless, and I am running through a few tutorials. I'm using GeoExplorer to manipulate layers defined in GeoServer (running from my ...
2
votes
2answers
61 views

How to export thousands of features from PostGIS to a single GeoJSON file?

I know how to export one feature from a PostGIS database using ogr2ogr: $ogr2ogr -f GeoJSON out.json "PG:host=localhost dbname=xxx user=xxx password=xxx" -sql 'select id, county, wkb_geometry from ...
0
votes
1answer
31 views

how to query contour postgres db for elevation at a point using postgis

Is there a way to interpolate between these contour lines for a given point using postgis? Thanks.
0
votes
2answers
38 views

How can I measure linestring on postgis?

I have a linestring and I want to measure this line. I try it on google maps. the result is that 0,65 km ...
1
vote
2answers
44 views

postgresql rule to trigger

I have two spatial tables and I am mirroring the data between the two table with a postgres rule: CREATE OR REPLACE RULE create_centroid AS ON INSERT TO csg.client_area_request DO INSERT INTO ...
0
votes
0answers
61 views

Downloading the distribute_setup.py

I need to download distribute_setup.py from the following website and the website seems to be broken, has anyone got an idea where else I can download this from? ...
1
vote
1answer
45 views

Get closest (source or target) of an edge from a point in postgres

I have a Postgres custom function that uses pgr_dijkstra to generate a route working. It works be passing the lat/lon of the start and destination points. I then find the closest segment vertice to ...
3
votes
1answer
61 views

artifacts in SRTM contour layers processed with GDAL tools and rendered with mapnik

Here is my workflow for importing individual SRTM tiles into postgis using the GDAL utils and rendering a png using mapnik: gdal_fillnodata.py -srcnodata -32768 gdal_contour -i 10 -a ele -snodata ...
0
votes
1answer
62 views

Split OSM highways at vertice

I am looking for a tool or query to split the OSM highways into multiple segments. Each segment should only consist of two nodes (start and end). I should do the same as described in this GIS ...
2
votes
2answers
77 views

finding the outermost border of a set of geomertries (circles)

I have a (large) set of geometries (circles) that overlap.! I would like to find the nearest location outside of this group from my current location. In this example my location is the black dot. In ...
1
vote
1answer
57 views

Creating new lines from existing lines based on points lying along the lines

I am pretty new to PostGIS and I have a problem I just can't figure how to start. I have a table of lines (id, name, the_geom) and a table of points (id, name, the_geom). Each point is located on a ...
1
vote
2answers
129 views

QGIS project with PostGIS layers freezes irregularly for minutes

I'm using about 30 more or less complex PostGIS layer in my QGIS project. Some of them are PlanetOSM layer generated with osm2pgsql. The Project loads fast (ca 5 sec). The canvas update by moving or ...
1
vote
0answers
25 views

Import .gfs file into PostGIS?

Is it possible to import a .gfs file into PostGIS? I can open the .gfs file in QGis, so I assume it is a geographic file of some kind: but I'm not sure how to get it into PostGIS. I have Googled but ...
2
votes
1answer
33 views

ogr2ogr: Can I add a field when I import to PostGIS?

I have a bunch of GeoJSON files that I want to import to a PostGIS database. I can import individual files perfectly as follows: ogr2ogr -f PostgreSQL PG:"host=x user=x dbname=x password=x" ...
3
votes
1answer
140 views

PostGIS doesn't use index for spatial query

I can't get PostGIS 2.1 running on PostgreSQL 9.3.5 to use a spatial index even for the simplest queries. The whole dataset is 8 million points (population count grid from here ...
0
votes
0answers
20 views

Generate random points in geometry near heatspots

I have an algorithm, that generates random points with in a given polygon (Generate random points in polygon. Algorithm question). The Polygons the points are generated in are communities or districts ...
0
votes
0answers
34 views

how to refresh the map automatically

I am using OL3 and geoserver and postgis as database. My database is connected to geoserver and OL3 conected to geoserver and reads the points in database as vector layer and shows on the map. my ...
0
votes
1answer
29 views

osm2pgsql cannot connect to postgis database, running on a Bitnami project installer

Based on this guide I am trying to import an .osm.pbf file into my PostGIS database, which is running on my Postgres Bitnami installation here: [bitnami@ip-xxx]/usr/share/proj$ which postgres ...
0
votes
0answers
54 views

Intersection postgis TopologyException

I'm trying to make a quite simple analysis in Postgis, but I'm finding some problems. I want to in the first place create buffers for then, intersects themselves but one, this will be differenced. ...
0
votes
1answer
112 views

What should be my learning progress regarding GIS open source [closed]

I was wondering for a while now, what should be the hierarchy of my GIS knowledge or better to say, learning curve in domain of open source GIS. Should I start with Geoserver and PostGIS then ...
0
votes
0answers
48 views

How to split linestrings where start/end points don't touch nearby lines

I am trying to figure out some basic routing with PostgreSQL/pgRouting and I'm struggling a bit. Our network of linestrings are not topologically correct, tracks that should be connected don't touch, ...
0
votes
0answers
10 views

postgis resampling two rasters to a common grid system?

I am testing the PostGIS map algebra (ST_MapAlgebra) on two different raster tables. Each table contains a single image/row. They have the same SRID but different, overlapping extents and different ...
0
votes
0answers
26 views

PostGis: find distance if closer than X. For huge sets [duplicate]

I have two tables (that can have different geometry: point, line, polygons, ecc...) and I have to find distances: for all features in table A, for all features in table B, if feature is closer ...
1
vote
1answer
38 views

Is product purchaser in distribution area?

I am going to be using PostGIS 2 to create a lookup service. Given a point (lat/lon), I need to either find if a product can be distributed there, or b) a list of products or distributors. I am ...
0
votes
1answer
65 views

Solving “Traveling Purchaser Problem”

Till now, I was using PostGIS-pgrouting pgr_tsp function to solve Travelling Salesman Problems. This function can give us the best possible route depending upon the cost parameter when the starting, ...
0
votes
0answers
48 views

strange result of spatial functions postgis

I have a problem with different result of spatial functions for same geometry. For some reason result I get when I use geometry from database is different then result when I load same geometry from ...
2
votes
1answer
40 views

Layer from PostGIS with array of integers fields?

I have GeoServer 2.6 and I published a vector layer (point) which some of the field attributes are integer's array. GeoServer doesn't recognize those fields in wfs call or even in the Feature Type ...
0
votes
0answers
11 views

How to get linestringe from kml into shp or postgis [duplicate]

Im looking into extracting linestrings from a kml file into a shp file or postgis db. Each linestring would be a feature/row. How would I go about it usinge ogr2ogr or python? I'd like to get ...
0
votes
1answer
15 views

ogr2ogr - gpx to PostGIS has wrong timezone adjustment

A gpx track point: <trkpt lat="52.321775959804654" lon="-72.647269548848271"> <time>2014-10-01T16:07:19Z</time> </trkpt> is imported with ogrogr in my PostGIS ...
0
votes
0answers
26 views

Create polygon with predefined size

I need to create a polygon (square) with a predefined size to place it anywhere in a map. The size is given in centimeter (size in cm * scale = size in real). Is that possible with postgis/qgis?
0
votes
1answer
20 views

OpenGEO templates and postGIS

I am trying to display my shapefiles.shp with ol3edit template. On OpenGEO Suite I have successfully created an ol3edit application.I'm in possession of the ol3editApplication.war but the ...
0
votes
1answer
31 views

Splitting multiline into several same-length multilines

Is there a method to convert a multiline geometry into several multiline geometries having the same length? For example break this: MULTILINESTRING((1 1, 3 1, 3 1.5, 2.5 1.5)) Into [approximately] ...
1
vote
0answers
60 views

Simplifying geometries and calculating non-spatial averages

I'm quite new to using proper spatial tools, and have a simple question that doesn't immediately show up on google. I have a table that contains multiple rows of empiric data (say, speed of a ...
1
vote
1answer
57 views

Visualize large amount of geopoints with Geoserver and PostGIS

I have a postgis database with over 50 million rows. Every row consists of a POINT corresponding to lon,lat and a value (number 1-100) I'm trying to create tiles for zoom levels 5-20 that I want to ...
3
votes
2answers
51 views

How can I export data containing umlauts from PostGIS to shapefile, without losing the umlauts?

I am exporting my Finnish (Finland) data from PostGIS to esri shapefile. I am using the PostGIS Shapefile Import/Export Manager and I don't see any way to specify the encoding of the shapefile's ...
0
votes
0answers
33 views

Overlapping gpx imported to PostGIS with ogr2ogr

I can successfully import track points from gpx file into my PostGIS database the usual way: ogr2ogr -f "PostgreSQL" PG:"dbname=ABC user=usrname password=123" firsttracklog.gpx However, I have a ...
1
vote
1answer
34 views

Index to speed up ST_HausdorffDistance?

When comparing similarity of linestrings with ST_HausdorffDistance (or another type of similarity function), is there a way to use an index to speed up the search for similar linestrings?
1
vote
1answer
84 views

How to import multiple shapefiles without any dbf to a postgis database?

I have a polyline shapefile (.shp and .shx) without .dbf. I would like to import the shp into Postgis. In order to do that, I created the corresponding .dbf using the r code provided by mdsumner in ...
2
votes
1answer
73 views

PostGIS Nearest Neighbour outside buffer

I am trying to find the 6 nearest neighbours to a point which are outside a defined buffer. Basically I am comparing points of the same table and working with Mike Gleason's examples. WITH subq AS ...
1
vote
0answers
37 views

Create a “wide” table recording all overlaps between polygons in PostGIS

I have a set of overlapping polygons and would like to record which polygons are overlapping at each intersection. I have followed the instructions at: ...
0
votes
0answers
15 views

postgis & mapnik “column ”CLASS“ does not exist”

I've piped an osm map of greece into postgis with osm2pgsql and was playing around with C++ mapnik sample code giving "planet_osm_polygon" as the source table: parameters p0; p0["type"] = ...
5
votes
1answer
91 views

SQL “Case” statement when count(*) is 0

I am trying to write the following SQL command using case clause. with x as (select the_geom as geom from table1 where st_dwithin(the_geom, st_setsrid(st_makepoint(28.959495,41.019913), 4326), ...
1
vote
2answers
35 views

Insert values in Postgresql in Java

Hello i try to insert same values in my table but i write this code String sql = "INSERT INTO points (gid, osm_id, name, type, geom)VALUES (?, ?, ?, ?,ST_GeomFromText('POINT(?, ?)', 2100));"; ...
1
vote
1answer
64 views

Modifying “pg_hba.conf” file to listen local TCP/IP conection

I am starting with PostGIS and there is an error when trying to connect through a TCP/IP connection. What I have done is: installed PostGre 9.3 in my PC, then installed PostGIS 2.3 for postGre 9.3, ...
3
votes
0answers
29 views

Prevent PostGIS Topology from splitting edges on line insert

I'm dealing with a large amount of road data represented with PostGIS Topology types. Anytime I add an edge over another edge, the edge is automatically split and a new node is created at the ...
0
votes
0answers
17 views

postgis st_makeline, points with rounded time

I have seen a number of example SQL statements that take gps points, order them by time, them use ST_MakeLine to make a Linestring. I think my trouble comes from that fact that my times are rounded to ...