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

learn more… | top users | synonyms

0
votes
0answers
9 views

Hex grid value interpolation in POSTGIS

I have a table of tessellated hexagons that I created as a hex binning grid to cover an area. I've then overlaid a point set to give some of the hexagons a value, see diagram:- The shapes with ...
1
vote
1answer
12 views

How to export postgis points as blocks in dxf with ogr2ogr

I'm trying to export postgis points as blocks to DXF format. I have a simple table in postgis with columns: CREATE TABLE pod_com_azimuth ( ogc_fid integer, rotation double precision, pointtype ...
1
vote
1answer
16 views

How to generate pgrouting source and target with OSM?

Is there anyone here can explain me more details for pgrouting's source and target? I'm wondering how to generate with the given lonlat in OSM PostGIS entities. In pgrouting's website, they are ...
3
votes
1answer
57 views

How to get the centroid of a set of points in POSTGIS?

I use PostgreSQL with POSTGIS extension. I have a set of points in the_geom column from a table myshema.myobjects I would want create a select statement to get the centroid of this cluster, so from a ...
2
votes
2answers
76 views

Recommended opensource solution for storing, publishing and querying GIS data

Our company has millions of feature classes currently stored through ArcSDE on SQL Server 2008 R2. We are kind of slowly making our way to opensource software. What we want to achieve is to be able ...
0
votes
1answer
14 views

How to get pgrouting source and target value using openlayers 2/3?

Is there anyone can teach me how to get the pgrouting's source and target parameters in openlayers 2/3? I plan to get those parameters by click the OSM map layer. Currently, I can only get the lonlat ...
1
vote
1answer
15 views

Remove inner polygons postgis

I'm trying to remove inner polygons with postgis. I've created a routine, that resumes in: From a polygon table, with a unique id: -Create a linestring table from polygon -Import to postgis -Get the ...
1
vote
1answer
38 views

How to write a (memory) layer from QGIS to PostGIS?

I am looking for an "elegant" solution to write, from a python script, a layer from qgis and into a new table of a PostGIS database. I thougth that this might be solved by QgsWriteVectorLayer, but I ...
0
votes
0answers
11 views

Problem in importing .osm file with osm2pgrouting 2.0

i've got two different systems: First system is: Ubuntu linux 64bit Postgres 8.4.8 Postgis 1.5.1 pgrouting 1.05 osm2pgrouting 0.2.0 This the system i've used for an old project that is already ...
1
vote
1answer
45 views

How to compute a line intersection point in a street layer in postgis 1.4?

I have a street layer downloaded from osm. I need to calculated intersection point as we do in qgis from vector menu -> Analysis tool -> Line intersections. I am new to postgis/postgres. any how i ...
0
votes
1answer
13 views

Pgrouting install debian 7.5 whezy

I need to install pgRouting on a Debian 7.5 64-bit server. I have PostgreSQL 9.1 and PostGIS 1.5 running. But somehow I can not install pgRouting. 1 - To use add-apt-repository ran the command: ...
1
vote
0answers
30 views

Undefined symbol error when creating postgis extension

When trying to create postgis extension, I'm getting an error, no references in google on it. maptest=# CREATE EXTENSION postgis; ERROR: could not load library "/usr/pgsql-9.3/lib/rtpostgis-2.1.so": ...
3
votes
1answer
78 views

PostGIS: Insert a Point using Python

What is the right way to insert a Point to a PostGIS database using Python?
1
vote
1answer
37 views

Extract lat, lon Points from Polygon

I have PostGIS database, and want to extract lat, lon pairs sequence from Polygons (and MultiPolygons). As a very fresh PostGIS user, I'm able to just extract the Polygons: SELECT ...
1
vote
1answer
22 views

How to add labels parallel to lines, polylines or multilines using Leaflet?

I want to add road name parellel to its line or if the line is curved, then the label should also be curved. How to add these name labels using leaflet? example image
0
votes
2answers
33 views

Dealing with custom projections (from prj file) in PostGIS (also GeoServer and OpenLayers)

Basically I want to perform spatial queries like distance calculations in PostGIS using data from shapefiles with different projections, some of which have no SRID code that I can find and also which ...
0
votes
1answer
34 views

PostGIS change column type varchar => geometry

I have a Postgres database with PostGIS extension on it. Also, I have a table with column lat with type (varchar 40). Column values are like this: 52.1432514 52.1431855 52.1431586 I want to convert ...
4
votes
3answers
101 views

PostGIS non functional on Ubuntu 14.04

I am unable to create the PostGIS extension on new databases in Ubuntu 14.04: $ psql pg_testing -c "create extension postgis" ERROR: could not load library ...
1
vote
1answer
29 views

Some items have coordinates switched when loading PostGIS layers in QGIS

I am having problem with strange coordinates switching when loading PostGIS layers in QGIS. First, I thought, that problem may be cause by the use of GROUP_BY feature in layer query, but later the ...
-1
votes
0answers
19 views

How can I use osmosis to turn on windows osm postgis to date? [closed]

How can I use osmosis to turn on windows osm postgis to date? I'm in the wiki but http://wiki.openstreetmap.org/wiki/Osmosis esotu starting to work with pgrouting and osm date and I do not understand ...
1
vote
1answer
29 views

POSTGIS Raster - Merge polygon onto raster

I have two tables, SCHEDULE contains polygon geometries and RASTER contains raster tiles I want to take a polygon from the SCHEDULE table and overlay it on top of a set of RASTER tiles that intersect ...
0
votes
1answer
26 views

postgis loader osm shapefile

I downloaded the map of my city already in shapefile into postgis http://metro.teczno.com/ to load in order to consult routes using pgRouting. Iss happening the error: http://metro.teczno.com/ ...
1
vote
1answer
27 views

How to configure osm2po to ignore certain class types?

I'm trying to import data using osm2po but am only interested in driving distances, so I'd like to omit all footway, cycleway, steps, etc. in the imported dataset. How can I configure osm2po to do ...
1
vote
1answer
65 views

Counting self intersections of linestring using PostGIS?

Is there a way of using PostgreSQL + PostGIS for finding the number of self intersections in a linestring? I have a linestring that goes forward but in circles, and I need to find the number of times ...
0
votes
1answer
24 views

Issues ST_MakePoint in PostGIS with Geoserver

I am trying to setup a GIS system to use PostGIS and Geoserver. I have loaded all of the data into a table. The data that is received has long/lat coordinates in Degrees, Minutes, Seconds, Direction, ...
0
votes
0answers
18 views

Text in POSTGIS Raster

Is it possible to add text/annotation to a raster generated in Postgis raster? Specifically I need to do this within the database if possible and am looking for an option that does not require an ...
1
vote
2answers
26 views

How to extract a new linestring vector from a existing multipolygon in QGIS?

What I want to do: create a new line (named linestring in Postgis?) from existing multipolygon layer in Postgis. Purpose: once these lines are created, I'll run some distance calcs from specific ...
0
votes
0answers
33 views

Calculating driving distance from many nodes (sources) to one target using PgRouting?

I'm using a PostGIS / pgRouting database setup with a road network. And I want to calculate a driving distance and shortest path from many sources to one target. I found that pgr_kDijkstra can ...
4
votes
1answer
163 views

What is the internal format of PostGIS?

PostGIS stores its geometry entities as long strings: SELECT ST_GeomFromText('POINT(32.0 34.0)',4326); st_geomfromtext ---------------------------------------------------- ...
1
vote
2answers
40 views

What is best way to reorganize osm into PostGIS database entity?

I'm just wondering how to reorganize the OSM given entity to more flexible and schematic purpose. The OSM gave 4 entities the planet_osm_line, planet_osm_point, planet_osm_polygon and ...
1
vote
1answer
23 views

ST_ClosestPoint in 2D but retaining Z value

I have a query in PostGIS where I have a two geometries, a MultiLineStringZ and a Point. I want to find the 3D point on the MultiLineStringZ closest to the Point by it's flat 2D plane distance, so ...
0
votes
1answer
25 views

pgRouting pgr_tsp() not returning results when used with SQL parameter

I’m trying to solve the travelling salesman problem with locations pulled from a database, e.g.: mydb=# SELECT id::integer, location_lng::float AS x, location_lat::float AS y FROM addresses where ...
0
votes
0answers
48 views

How to create a vector layer from a GeoAlchemy2 query?

I'm currently developing a QGIS plugin where I mapped a PostGIS database via GeoAlchemy2. I wrote a function that returns results from a GeoAlchemy query but have no idea how to create a vector ...
3
votes
3answers
84 views

Offline Map Service with Mapnik and Leaflet

I'm relatively new to GIS, so I hope my asking doesn't appear to be ignorant in any way. I currently work on an offline map service solution for usage in areas without internet connection. For that ...
1
vote
1answer
71 views

Mapnik + OpenStreetMap + Shapefile with Raster Images + Mod Tile + PostGIS

I am new to GIS. I have a Shapefile (.shp, .shx and .pbf). The .pbf file contains path to PNG files located on my machine only. I was able to save the Shp data to PostGis via Shape2Gis tool. Now ...
1
vote
1answer
30 views

How to add a new permanent column that contains result from ST_AREA select queries

I am a total newbie here, I have a bunch of polygons in my cartodb map, and I want to create a new column called "AREA" in the table MY_TABLE that contains values from my area calculation query: ...
0
votes
2answers
36 views

Keeping up to date with OSM changes in pgRouting

I'm working on a routing application using OSM and pgRouting. I'm only interested in a subset of data, mostly North America (performance was difficult for large amounts of data, so don't want to use ...
0
votes
1answer
27 views

How to easily remove loose/isolated edges from pgRouting network?

I wondered if there's an easy way to 'clean up' a pgRouting network by removing those edges that do not connect with the global network. Otherwise you risk to end up with cost values of -1, meaning ...
5
votes
2answers
114 views

Growth of a PostGIS database for Social Media - Move to Cassandra?

I currently have a large and growing database of geo-social media. I'm using Postgres with postgis, and so far it's been quite good. My use case thus far has been to query the database for all posts ...
2
votes
2answers
57 views

How to rename PostgreSQL/PostGIS columns while importing Shapefiles?

I discovered shp2psql to successfully import geospatial data from ESRI Shapefiles into PostgreSQL/PostGIS. Now I would like to automatically rename the target column names. Is there any mechanism ...
1
vote
0answers
16 views

Debugging ogr2ogr “AddGeometryColumn failed” and “Terminating translation prematurely after failed translation of layer”

As noted in the title, I'm getting the following error: ERROR 1: AddGeometryColumn failed for layer pretty_polys, layer creation has failed. ERROR 1: Terminating translation prematurely after failed ...
0
votes
0answers
39 views

Editing PostGIS data in ArcGIS Desktop?

Quick question regarding editing PostGIS data in ArcMap 10.0. Far as I can tell, this can only be accomplished through third-party plugins like GISSquirrel or ST-Links. Does anyone know of an ...
0
votes
0answers
12 views

Why is there greyed dupplicated table in Add PostGIS Layers dialog in QGIS 2.X

Does somebody knows why PostGIS 2.X tables are duplicated and greyed in the "Add PostGIS Layers" dialog in QGIS 2.X.? One is coloured with geometry type recognised the other is greyed with unknown ...
0
votes
0answers
16 views

Calculate distance between point and linestring, save the distance as table and represent that on QGIS? [duplicate]

I have loaded my data with osm2pgrouting and I have my network with ways (Linestring) and nodes (Point). The problem is : I have a database of doctors addresses (point) and I should calculate the ...
0
votes
0answers
13 views

Optimize Tilemill export of project with contour-lines

I have a project in Tilemill (based on OSM-Bright) that covers Europe and also displays Contour-Lines. My problem is that the performance is pretty bad when exporting my map. I've already seen that ...
0
votes
1answer
21 views

ST_Intersects returning incorrect result on routing problem

I have a table that contains the shortest path between destinations for survey respondents on an osm2po created network. When calculating the shortest path result, I store the geometry in a column. ...
1
vote
1answer
32 views

Get points along a line at defined distance

I was reading a lot of similar questions here but no one ask about postgis (or I didn't find it). I have a line in postgis and I want to get the point along the line at defined distance. It is ...
2
votes
1answer
46 views

Calculate distance between point and linestring and how to represent that on QGIS?

I have loaded my data with osm2pgrouting and I have my network with ways (Linestring) and nodes (Point). The problem is : I have a database of doctors addresses (point) and I should calculate the ...
0
votes
1answer
43 views

Converting a JOSM indoor map to QGIS

I have created an OpenStreeMap layer of the indoor of a bulding by following this tutorial: https://wiki.openstreetmap.org/wiki/IndoorOSM, since that is only a proposed tagging schema for indoor ...
2
votes
0answers
20 views

PostGIS query with input from point layer

I have a table of rivers in PostGIS, each river linking to its outflow. I also have a QGIS layer of some selected sources, and would like to select the entire river downwards from each source (i.e. ...