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

learn more… | top users | synonyms

1
vote
1answer
54 views

Reprojecting in postGIS from 900913 to 4326. Wrong coordinates

I'm working with postGIS 2.1 I have a table called 'xacementos' created with the srid: 900913. I took the points coordinates from google maps and I want to convert them to SRID:4326 to show the points ...
2
votes
1answer
89 views

Transform projection from EPSG:4326 into EPSG:900913

. i've got this problem about projection. .i just wanted to know what am i missing. . i already displayed map base layer using openlayers through base_layer = new OpenLayers.Layer.WMS( "OpenLayers ...
1
vote
1answer
37 views

PostGIS: Faster way to ST_Clip() rasters with a polygon?

I want to clip an image with a polygon from postGIS rasters. What I do: - Import raster into postGIS(raster2pgsql, tile-size: 500x500, each tile contains 12 bands landsat 8) - Import a shapefile ...
0
votes
1answer
66 views

QGIS 2.2 Data Defined Label Position on Postgis Layer Null Defaulting to 0

I just upgraded to qgis 2.2 from 2.0. In 2.2 there was a minor change to data defined label positioning at least when used with postgis layers. In Version 2.2 the labeling engine appears to be ...
0
votes
3answers
48 views

How create geographic column in postgis table?

I merged several point shape files in postgis, but when I load the new merged shape in QGIS it is not possible to see points in the main window. To create the merged table I used this piece of code ...
7
votes
1answer
133 views

Replacing a corporate GIS [closed]

I'm looking at replacing our corporate GIS, this is the first time that I have had the responsibility of such a task despite my years of experience with the software as an end user. We will be ...
2
votes
1answer
51 views

How to access M-values in QGIS?

I am working with Linear Reference Systems and I know is very easy to get M coordinate (M-value) from a shapefile in ArcGIS. But, how to get the M-value in QGis? If you have doubts about my issue, ...
1
vote
1answer
49 views

PostGIS convert GeoJSON to geography

While there are functions to convert geography to GeoJSON: text ST_AsGeoJSON(geography geog, integer maxdecimaldigits=15, integer options=0); I do not see any way to go the opposite direction ...
0
votes
0answers
60 views

ArcMap reports that PostGIS polygon data is self-interescting

I have an ESRI File Geodatabase of data that I upload to PostGIS using FME. Seeing as I have to have the data in PostGIS for other purposes, it would be great to view the data in ArcMap straight from ...
0
votes
0answers
16 views

Transforming multiple LineStrings to shape for ST_Contains

I want to find cities, villages etc inside each region of Poland. For most of them querying something like this is enough: ... AND ST_Contains((SELECT way FROM planet_osm_polygon WHERE osm_id = ...
1
vote
1answer
28 views

ST_AsLatLonText returns wrong data

I want to list all cities in lubelskie vovoidenship, which is relation 130919. I also want to get latLong data for each city. To perform this I do: SELECT name, ST_AsLatLonText(way), place ...
1
vote
0answers
34 views

How can I edit spatial data automatically on postgis and check for topology errors on said data whitout using shapefiles?

So, I have spatial data stored in postgis (points, lines and polygons) and would like to edit and update those in an Open Source software (quantum GIS, grass, etc.) to check for topologic errors, ...
1
vote
1answer
42 views

Problem with runing a loop in a query in PostGIS

I am new to PostGIS and I have a question which can't solve. I have a table of buildings each having a value for number of people living in it. I would like to calculate the total value (sum of number ...
1
vote
0answers
45 views

PostGIS: How to distinguish overlapping routes (i.e., LineStrings) based on their direction?

I have a set of routes which are represented by LineStrings in my PostGIS database. These routes represent journeys that people make. I want to come up with routes that (a) overlap, and (b) have the ...
1
vote
1answer
63 views

Problem with nested query in PhP and PostGIS

I have a simple problem regarding a nested query. I would like to select all buildings in a given circular buffer and create a kml file of those selected objects. The following query does the job very ...
2
votes
3answers
95 views

Problem with result of query in PostGIS

I run the following query and irrelevant of the point coordinates and radius I always recieve all the records of the table I'm querying. Can anyone point out what the problem could be with this query? ...
2
votes
1answer
223 views

Installing Postgis on Ubuntu 12.04: unmet dependencies libgdal1

After sudo apt-get install postgresql-9.1-postgis I got that massage: The following packages have unmet dependencies: postgresql-9.1-postgis : Depends: libgdal1 (>= 1.9.0) but it is not going to ...
6
votes
1answer
140 views

How can I transform polylines into points every n metres in PostGIS?

Question in pretty much the same as this, but I need to use PostGIS. I have a number of polylines, and want to trasform them into points every n metres along these lines. edit: Thanks a lot to ...
2
votes
0answers
24 views

How to set posgis default sequential value in a QGIS “editable” view?

Introduction In a QGIS project I have a VIEW, that I want to became editable (I'm trying to replicate the versioning system used DB Manager with some tweeks). Therefore I created a few rules to ...
0
votes
0answers
24 views

Postgis and osm2pgsql: find all cities that belong to selected state [duplicate]

I'm pretty new to postgis, so I don't quite understand it's mechanisms yet. My task is to build database with relations: +---------+ +------------+ +----------+ | country | | adm_unit ...
2
votes
1answer
53 views

Split and order lines by polygon intersection

I am using PostGIS and QGIS 2.2. I have a shapefile of rivers and a shapefile of state parks and other polygons. I would like to show the user a simplified version of a stream as a straight line, ...
0
votes
1answer
56 views

CartoDB st_makeline with geography datatype

Hi I am using an online cartodb account to try and create a shapefile based on flight routes between one airport and another. So far, I have uploaded my lat/long points for each connected airport, ...
0
votes
1answer
20 views

How can I combine two datasets with the same schema in to one table?

So I have two tables (in CartoDB/PostGIS) that are from two tiger shapefiles that have the exact same attributes, just in different counties. I want to combine them in to a single table, just ...
0
votes
1answer
16 views

Is rid=2 significant in PostGIS raster structure?

It seems that in most, if not all, examples with raster appear to include the WHERE rid=2 statement in the query. http://postgis.net/docs/RT_ST_Value.html Is there something about the rast structure ...
1
vote
1answer
57 views

ST_Transform not converting from utm to lat/lon

This line: ST_AsText(ST_Transform(the_geom, 4326)) Returns the "coordinates" as utm coordinates. Although, I thought ST_Transform was supposed to convert the coordinates from utm to lat/lon. I ...
1
vote
1answer
58 views

PostGIS Raster in MapServer

I'm having trouble getting a PostGIS raster to load and display in MapServer. I'm not sure, but suspect it's a version problem. My mapfile layer and the error message are shown below. LAYER ...
1
vote
1answer
54 views

Problem with using a circle as polygon for querying PostGIS

I'm trying to query PostGIS and find some object features that intersect with a circular buffer created by the user using OpenLayers, JavaScript and PHP. I use the following code for creating the ...
0
votes
0answers
54 views

Add memory layer to a preexisting PostGIS table

I'm trying to append a memory layer to a preexisting PostGIS table. The DB connection is already established (in this way: How to properly establish a PostgreSQL connection using QgsCredentials) and, ...
-1
votes
1answer
37 views

plypython set-up

I am trying to set up plypython on the following system: Windows 8.1 PostgreSQL 9.2 64-bit PostGIS 2.0 Python 2.7.05 I have added plpython2.dll to \PostgreSQL\9.2\lib When I run: CREATE ...
2
votes
1answer
51 views

Problem with reading data from PostGIS as KML file using PHP

I am using the following PHP code in order to read data from PostGIS and save it in KML format as a file. When I load the page a document with ".PHP" extension is returned (not .kml) which inside has ...
3
votes
2answers
57 views

Distance calculation PostGIS

I've got the following task to solve: I've got two tables; one contains buildings (houses) as points and the other contains train-stations (at_bhf_classified) as points. I need to find out the ...
1
vote
1answer
27 views

violates check constraint

I try to add a constraint based on geometry type to a "street" table that prevents anything except Linestring geometry or Null. alter table streets add constraint streets_geom_linestring_chk ...
0
votes
0answers
20 views

pgrouting - possible to find route through points rather than links? [duplicate]

Probably a daft question, but... I've been looking at using pgrouting to analyse paths between start/end points, but this analysis seems only to find routes through links (edges). Is there any way ...
2
votes
0answers
42 views

How do I simplify the straight sections of (multi)Linestring in PostGres/PostGis leaving the curved sections untouched

I have (multi)linestrings containing upwards of 5000 points and I want to perform two simplifications possibly using Ramer Douglas Peucker or alternative methods in PostGis The (multi)linestrings ...
2
votes
2answers
60 views

Problem in running query on PostGIS using PHP

Would you kindly help me solving this problem. I'm trying to use the PHP code provided here in order to read geo-data from PostGIS. The code seems clear without any problem (also nobody has ...
1
vote
1answer
56 views

Most Efficient method of Storing Point Data in PostGres/PostGIS to later re-create a track

I am trying to determine the most efficient way to store point data in PostGIS to later re-create tracks Criteria: 1 second updates 100- 200 tracks active at any one time 1 hour max ...
2
votes
4answers
266 views

How to turn all lines into one direction?

How can I turn all features of my polyline (postgis and/or shapefile) into one direction - it doesn't matter what direction. I know how to switch the direction of lines but I have no idea how to ...
0
votes
1answer
29 views

Installing Cartaro using Acquia Dev Desktop and and link it with GeoServer and PostGIS

How do i configure GeoServer and PostGIS so that I dont get the following error when installing Cartaro using the Acquia Dev Desktop. I am just installing Cartaro locally for testing. Or how can ...
2
votes
1answer
72 views

Add PostGIS spatial functions to a custom schema other than “public” in PostgreSQL

I am new to PostgreSQL and PostGIS. Recently, I created a PostGIS 2.0.3 database on a PostgreSQL 9.1 database server using pgAdmin. The "PostGIS" extension was found installed in "Extensions". Al ...
0
votes
2answers
100 views

Unable to implement pgrouting(plugin) pgr_astar routing algorithm (shortest path) [duplicate]

I have been working on a project for indoor navigation. I made the floorplan of the building and road-map for routing purposes as shp files (using JOSM, making GeoJSON and then converting to shp file ...
1
vote
1answer
51 views

Problem connecting local POSTGIS in QGIS

I'm trying to connect to local POSTGIS database using QGIS. I'm using the POSTGIS Tutorial form Buondless (rif. http://workshops.boundlessgeo.com/postgis-intro/index.html). The context is the ...
0
votes
0answers
155 views

Java + GMaps JSF + PostGis + JasonSanford / geojson-google-maps

Guys want to test how to plot lines and points in google maps using Java + JSF + PostGIS + GMaps JasonSanford / GeoJSON-google-maps. First have a spaceport in postgis with a table of rows and other ...
3
votes
1answer
186 views

Loading Shapefiles into PostGIS using shapefile import/export manager

I am a complete beginner with PostGIS. I've started learning it using the tutorials provided by Boundless. In section 4 of this tutorial where I want to import shapefile in PostGIS, I do not have the ...
0
votes
0answers
43 views

PyQGIS + PostGis: FATAL: sorry, too many clients already

I searched for questions regarding this problem and hadn't find one. I'm developing a custom application with a map canvas to show some geographic information from a PostGis database. After some ...
0
votes
0answers
26 views

error GT_PK_METADATA doesn't exist

I keep getting this error message in the Postgres error log. STATEMENT: SELECT * FROM public.GT_PK_METADATA WHERE 1 = 0 ERROR: relation "public.gt_pk_metadata" does not exist at character 15 I'm ...
0
votes
0answers
43 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 ...
0
votes
0answers
10 views

Prepare OSM file for PGROUTING use [duplicate]

Well I am new in the GIS World :p well I have a webGIS to realise and I want use OpenStreetMap. well the region I need wasn't vectorised so I modified it with JOSM ( Added Roads and buildings) and ...
1
vote
1answer
44 views

If using ogr2ogr to load a PostGIS DB, does the PG string need host and port arguments?

The ogr2ogr command in this question How to Import ESRI Geodatabase format .gdb into PostGIS was missing the host and port arguments, or so I thought. My answer included something like this ogr2ogr ...
0
votes
1answer
36 views

Is it possible to render POIs/landmarks from Postgres/postgis DB using google Map like icons?

Is it possible to render POIs/landmarks from Postgres/postgis DB using google Map like icons? Any readily available icon sets?
2
votes
1answer
103 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 ...