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

learn more… | top users | synonyms

0
votes
0answers
38 views

Query path shape independent of orientation

Here is an interesting problem I haven't been able to solve or find any solution anywhere. Lets say I have a path defined by 5 points like this one: How can I make a query (postgis) to find all ...
0
votes
1answer
40 views

What's the PostGIS equivalent to Extract Nodes in fTools / QGIS? [duplicate]

I'm looking to convert Park polygons from OSM into points. The QGIS fTools Extract Nodes tool will convert a polygon to points at the vertices. What is the equivalent function or work-flow in ...
2
votes
2answers
39 views

Can you rename the Django GeoManager object instance?

Is it possible to change the name of the GeoManager object from "objects" to something like "geo_objects"? The way I've done it in the code below is supposed to be the default way to configure your ...
1
vote
1answer
39 views

Incorrect lat / lon conversion from utm

I used this website to determine that the SRID for my shapefile is 3857. Following that information, I used the shp2pgsql utility to convert my shapefile into the sql I need to insert into PostreSQL ...
3
votes
2answers
69 views

How to reproduce FME Change Detector results in PostGIS?

we would like to use the function change detector from FME in PostGIS. We had a try with the following SQL-Statements but the function doesn´t work. There are no results in the end. The single ...
0
votes
0answers
31 views

Auto-reprojecting (st_transform) SRIDs in Postgis

I have a postgis table that is edited from different sources. The points added from Source 1 are in SRID 23030. The points added from Soruce 2 are in SRID 4230. I want all the points in the table ...
0
votes
2answers
171 views

Extracting data from four intersecting polygon layers in PostGIS

I've been using the following code in Postgres/PostGIS for the last year, as needed, which is about once a quarter. It works ok, it's just that it takes days to run. With over 25,000 parcels making up ...
1
vote
1answer
39 views

How to get all the LineStrings of a street using PostGIS with OSM

I want to get all parts of a given street. I use a query like: Select * from planet_osm_lines where name = 'mystreet' As a result I get all the LineStrings that are part of a street with the ...
1
vote
0answers
21 views

How to highlight joined features?

I have a task in QGIS (2.6), where I need to join two tables through an action (I think). I have some projects (points) that I need to connect to a list of partners (also points). I have data in both ...
2
votes
0answers
51 views

Hosting DigitalGlobe stereo imagery on GeoServer

I have a pretty fresh install of the latest Boundless OpenGeo stack (v4.5). I have a requirement to host some stereo satellite imagery. I'm using the sample imagery over China provided by ...
2
votes
1answer
30 views

How to add a band with conditional value to a raster with PostGIS

I'm trying to convert a vector polygon into a raster, with pixel values that indicate the area of the intersection. I have a query that gets the area of intersection between an empty raster and the ...
3
votes
1answer
63 views

From hundreds of shapefiles to PostGIS with some kind of directory/file structure

We have more than 700 shapefiles which we will import in a PostgreSQL/PostGIS database. We want to use a single database to make joins on our tables without using foreign database wrapper. Our data ...
3
votes
0answers
44 views

PostGIS Recursive Query Based on Line Connectivity

I'm having difficulty with a query. I have a network of linestrings, each with a value in the n_type column. This can be one of a handful of options. I'd like to generate a new table that groups any ...
2
votes
2answers
96 views

osm2pgsql: database “gis” does not exist

I am currently attempting to use OSM Bright to quickly style some OSM data, so I can export tiles without spending hours writing Carto in TileMill. This is my first time using osm2pgsql to import OSM ...
1
vote
1answer
35 views

osm2pgsql - can't find “maxspeed” tag after import

I have import a compressed osm file ".pbf" in a postgis database with osm2pgsql using the following command: osm2pgsql -c -d osm_france -U postgres -H localhost -S default.style -C 10000 ...
0
votes
0answers
27 views

get wms info with Leaflet

I am trying to export(excel,xml or pdf formats) wms feature information using the next tools: 1.- Geoserver.-Provides a Sql statement wich generates a wms polygon layer. 2.- Postgis.-Provides the ...
0
votes
1answer
19 views

Points shapefile resulting in MultiPoints table in PostGIS

I have a Points shapefile. When opened with QGIS, the type is 'Point' (right-click on the layer and check properties). When imported in PostGIS using pgAdmin III plugin 'PostGIS shapefile and DBF ...
0
votes
0answers
43 views

Is there any way to create user login for single project in QGIS?

Is there any way to create user login for single project in QGIS? I want to track changes on database when users update features. I know that I can do this on database level but is there way to do ...
0
votes
0answers
34 views

Invoke PostGIS geocode function using Python

I have a PostGIS Geocoder built with using Tiger data. Using SQL, I am able to execute all database functions and queries. I want to use it with my Python program. One of the option would be to write ...
2
votes
0answers
34 views

Generate contour lines for big DEMs and import into PostGis

I've downloaded the SRTM DEM files for most of Europe, from both 3arc_v4.1 and 1arc_v3 versions. The first comes in 5x5 degrees tiles, the latter in 1x1. I can stitch them together with gdalbuildvrt ...
0
votes
1answer
83 views

Openlayers Load Blank Tiles - How To Combine OpenLayers 3 to MapServer version 6.0.3 (MS4W 3.0.6)

I Have Some Experiences With Openlayers 2 Now I Want To Combine OpenLayers 3 And Mapserver And I Tried The Below Configs And Code On OpenLayers And MapServer But The Openlayers Load White And Blank ...
0
votes
0answers
24 views

Query road shape

We have downloaded data from Openstreetmap and want to make special queries but have no idea how to start. What we want to do is find all road intersections with a certain angle in Australia. For ...
1
vote
1answer
153 views

postgis: cluster/group points based on distance

We have a set of thousands of points and want to group all of those which are within 100m distance from each other (to get the centroid from each group). A first idea was to build 100m buffers around ...
1
vote
0answers
42 views

Dividing a geographical area (bbox) into smaller equal sized square miles

I'm working on an automated system for processing geographical information by bbox using PostGIS with an Openlayers 3 UI. The user will use dragbox to 'draw' the bbox they want processed. The catch ...
2
votes
2answers
106 views

How to render an SVG from PostGIS using ST_AsSVG

Speaking with a cartographer from National Geographic last night, my interest was again peaked in an open-source map publishing toolset built on PostGIS and Inkscape (as per his workflow and how ...
0
votes
0answers
34 views

Attributes and Zoom

I have loaded shapefiles on OpenGeo Suite template (ol3view), I'd like to create a popup on click for each point to show attributes. I'd also want to highlight a certain part of the map perhaps by ...
1
vote
1answer
33 views

How do I catch PostgreSQL/ PostGIS RAISE messages in OpenLayers?

Is it possible to catch Raise Warning, Raise Notice and Raise Exception in OpenLayers while using a WFS-T-Layer (stored in a PostGIS-Database) to save edits? Example: A trigger is used to check values ...
0
votes
0answers
28 views

Spatially joining 2 point layers i.e. pole and customer points using spatial join of PostGIS/PostgreSQL Without intersection and buffer technic

Intersecting customer points with pole feature with 20m buffer SELECT distinct h.gid, d.polecode as gid FROM customer as h LEFT JOIN pole_20 as d on ST_Intersects(d.the_geom, h.the_geom); ...
2
votes
1answer
32 views

Show “Raise Notice” and “Raise Warning” in QGIS

Is there a way to catch "Raise Warning" and "Raise Notice" (while editing PostGIS-Layers) from a PostgreSQL/PostGIS-Trigger-Function within QGIS? One example: I have a trigger that reacts to insert or ...
0
votes
1answer
52 views

Use ST_Buffer with a conditional distance based on an attribute

I am quite new to postgres/postgis and are still learning basic skills. I have imported a pointlayer shapefile into my postgres database. I need to make a buffer of varying radius around the points ...
1
vote
1answer
90 views

Postgis query to convert UTM to Lat long

I want Postgres/PostGIS queries to convert UTM coordinates from UTM 43N projection to Decimal Degrees 32643 projection. select ST_X(the_geom), ST_X(the_geom) from table
1
vote
1answer
65 views

Import of OSM data into PostgreSQL with osm2pgsql polygon problem

I've mananged to import my great-britain osm file successfully into postgres and I can query everything fine. osm2pgsql -s -j -G -l --number-processes 8 -K -U james -C 10000 -d osm myfile.osm I'm ...
1
vote
1answer
119 views

Display a layer from geoserver using OpenLayers 3

I'm wondering how to display a Layer in OpenLayers 3 which I host in Geoserver. I imported the Layer from a PostGIS-DB and it is possible to display it using the geoserver preview option. The Layer ...
0
votes
1answer
40 views

I converted a KML file into a PostGIS db using ogr2ogr. How do I publish all the tables as seperate layers?

As the title says I converted/imported a KML file into my PostGIS database using the ogr2ogr command. Now I am trying to publish each table as a seperate layer onto a GeoServer. I know about cURL, but ...
4
votes
1answer
52 views

How to Specify FID column name in shp2pgsql

In ogr2ogr I can specify the name of FID column using the option -lco FID={columnname} when importing a spatial data in PostGIS database. I am using shp2pgsql in case of shapefile and cannot find a ...
0
votes
1answer
44 views

Loading a specific county dataset in PostGIS

I want to load a specific county dataset in PostGIS. I can load a state script using: SELECT loader_generate_script(ARRAY['CA'], 'linux'); However, I want to load dataset only for Los Angeles County ...
0
votes
0answers
32 views

How to get a specific street using OSM with PostGis

I want to get the polygon form a specific street from the OSM data importtes with osm2pqsql using PostGis. Since the streetname isn't the only identifier I wanted to add the postal code as a second ...
0
votes
1answer
80 views

Polygon intersection with LineString in PostGis

I have a table which contains GPS coordinates at certain times. I created a LINESTRING from them ordered from the oldest to newest. I also have a POLYGON and I would like to determine the subset of ...
0
votes
3answers
123 views

ST_Distance values in kilometers

I need to make a query to measure the distance from a given point to all points in a table and return the five closest to that point. The problem is I can't convert the distance to kilometers. Here ...
0
votes
1answer
52 views

Find nearest node function

I am trying to get work the next function but i don't know if it is incomplete because the query SELECT * FROM pgr_nearest_node1('jaen',-3.75,37.779); does not provide any results. Here is the ...
0
votes
2answers
70 views

Connect to postgres localhost in QGIS

I am firly new to actively work with databases. I wanted to try out some stuff on my home computer where I have installed pgadmin and postgres previously. I can connect to my localhost in pgadmin but ...
0
votes
0answers
20 views

Is it possible to get Metadata from railway attributes using OSM at PostGIS

I am using a query that gets me all tram stations from my data using a POstGis Database. I have OSM Data from Geofabrik. Query: SELECT point.osm_id as id, st_X(point.geom) as lng, ...
0
votes
1answer
41 views

PostGIS Raster ST_AsRaster: error when creating raster from TIN surface

ERROR: rt_raster_gdal_rasterize: Could not create OGR Geometry from WKB ********** Error ********** ERROR: rt_raster_gdal_rasterize: Could not create OGR Geometry from WKB SQL state: XX000 ...
1
vote
2answers
142 views

How to calculate the Oriented Bounding Box (OBB) of a polygon or point set?

I'd like to calculate the "Oriented Bounding Box" (OBB) which is the enclosing rectangle aligned to the longest extent of a point set (which is not necessarily aligned with the axes of the co-ordinate ...
0
votes
1answer
24 views

Is the PostGIS Raster primary key required to be named rid?

In all examples from the PostGIS Raster reference the primary key in tables with a raster column is named rid. I wonder if that naming is expected by any functionality of PostGIS itself or any client ...
0
votes
0answers
44 views

Positioning a Map

Somebody recommended me to use this site:- http://cs2cs.mygeodata.eu/ after I explained that this coordinates[-28.23078, 28.30707] which belongs to Bethlem in South Africa centers the map to towards ...
1
vote
1answer
54 views

Adding PostGIS raster to QGIS via database manager

When I attempt to add a PostGIS raster to QGIS I get a GDAL error saying I need to set PGHOST. I have set PGHOST with export PGHOST=localhost but still get the error. How can I resolve this ...
1
vote
2answers
57 views

Planet_osm_point versus Planet_osm_nodes for querying places

Hello I am using a PostGis Database with OSM Data. After importing the data with osm2pgsql in slim mode I found a table named Planet_osm_nodes that has places also. It seems really compressed and has ...
1
vote
1answer
62 views

How to detect gaps in a MultiPolygon table with Postgis?

I have mapping of land use. In it, I need running topology to detect gaps between polygons. Is there postgis's function to do this? Thanks
0
votes
1answer
74 views

pgr_drivingdistance wrapper

Pgr_drivingdistance function works as : SELECT seq, id1 AS node, cost FROM pgr_drivingDistance( 'SELECT id, source, target, cost FROM edge_table', id, distance, false, ...