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

learn more… | top users | synonyms

2
votes
0answers
409 views

PostGIS: ST_Transform function conversion problem

I'm inserting map data from a GML file with srid EPSG:27700 into a PostGIS database table with srid EPSG:4326. I'm using the ST_Transform function as in this snippet: ...
2
votes
2answers
1k views

Select Duplicate Points PostGIS

I have a table made of merged point datasets in PostGIS. I want to select all of the features where two or more points have identical geom values. At present I just want to select so I can review ...
2
votes
2answers
2k views

Problem when calculating longitude and latitude for points

I have a PostGIS database with SRID=900913 (Google Mercator) and I would like to know the latitude and longitude of points. I use this command: ST_X(ST_TRANSFORM(the_geom,4283)) Following what is ...
2
votes
1answer
470 views

The minimum bounding circle of geometry that crosses the 180th meridian

Background: I've been given a task where I have to calculate the minimum bounding circle of Alaska (for the purpose of running a Roeck test). I'm using the Census' state level geometries available ...
2
votes
1answer
3k views

Basic MapServer query of PostgreSQL/PostGIS database

I've just installed MapServer on a linux server and I am trying to understand how to display a basic map using a PostGIS database. I have displayed a shapefile in the browser, so I know that the ...
2
votes
2answers
408 views

unable to call shp2pgsql using python

I am unable to call shp2pgsql using python as I have to pass various options like (-s -a -i) and I am not getting the required output .. Method I am using is p1 = subprocess.Popen(["cmd", "/C", ...
2
votes
1answer
861 views

GeoServer converting PostGIS timestamp with time zone

In a PostGIS view i have a field of data type "timestamp with time zone". In GeoServer this field is show with datatype "Timestamp" My problem is that i want the Timestamp to be show in my ...
2
votes
5answers
4k views

Error importing Shapefile to PostGIS using Importer GUI

I'm trying to import a shapefile into a PostGIS database using the graphical importer. I just installed POSTGRESQL, and PostGIS. The GUI looks like this: After testing that my database worked, I ...
1
vote
0answers
61 views

What is wrong with my WFS-T protocol setup?

So I want to transfer some Vector Layer Features from javascript code to my geoserver and then to postGIS, my code looks like this: saveStrategy = new OpenLayers.Strategy.Save(); ...
1
vote
1answer
44 views

Loading raster in postgis and link it with an existing table

Relatively new to PostGIS and I am currently exploring the options to make one of my PostgreSQL Tables spatial. Essentially I want to store a raster object in a table that also contains essential ...
1
vote
1answer
65 views

Is the Azimuth on the equator equal to the one not on the equator?

I am trying to fully understand the concept of Azimuth and I am encountering some inconsistencies (or maybe it is my error). I show you some examples that do not match, hoping somebody can explain me ...
1
vote
1answer
85 views

GeographyFromText and ST_SetSRID+ST_MakePoint different results?

Why am I getting different results? SELECT ST_DISTANCE( ST_GeographyFromText('SRID=4326;POINT(13.401111 52.383343)'), --berlin ST_GeographyFromText('SRID=4326;POINT(9.997559 53.533778)') ...
1
vote
1answer
206 views

Converting file geodatabase with coded domains to PostgreSQL / PostGIS?

We have several file gdb's and would like to convert these to Postgres / PostGIS. We've used ogr2ogr to transfer these files; however, some of the fields are stored as coded domains and the fields are ...
1
vote
1answer
152 views

Help defining custom CRS in QGIS 2.2

I'm trying to use EPSG:4479 in QGIS. 1) If I search for EPSG:4479, it returns a "Imported from GDAL" EPSG:4479, but it does not work. At the console, the following message is displayed: ERROR 6: ...
1
vote
0answers
135 views

Why does QGIS crash when my PostGIS table has a primary key?

Configuration: PostGIS Library: 2.0.3 GEOS: 3.3.8-CAPI-1.7.8 Proj: Rel. 4.8.0, 6 March 2012 PostgreSQL 9.2.2, compiled by VC++ build 1600, 64 bit, running on Win2012 server 64 bit QGIS 2.2.0 - 32 ...
1
vote
1answer
130 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 ...
1
vote
0answers
214 views

How to create a regular polygon grid in Openlayers?

I am trying to create a grid in my map and do some calculations. I seen the following links:- Create regular polygon grid using postgis Create regular polygon grid inside a polygon using postgis ...
1
vote
1answer
517 views

Error while installing PostGIS on ubuntu 12.04

This is my first practice on Ubuntu machine. Here i am trying to install PostGIS 2.1 on postgresql server 9.3.2. When i am following the procedure mentioned here Help I am getting the following ...
1
vote
1answer
682 views

Having trouble connecting QGIS with postgres database with postgis extension

I am working on Ubuntu Precise with postgresql version 9.3 and postgis 2.0. After initially starting my postgres database and eventually getting permission errors that would prevent postgres from ...
1
vote
0answers
44 views

How to load or query data directly to R from a PostGIS database using RPostgreSQL and rgdal [duplicate]

Is it possible to load/query a shapefile to R, which is stored in a postgres/postgis database? I've built up a connection to my postgres database via DBI, RPostgreSQL and I want to make some ...
1
vote
3answers
623 views

Why can't I open postgis layers in QGIS?

I've set up a table in PostGIS using OSM data (converted using osm2pgsql). I know this database is good, because I'm able to import it and work with it in TileMill, but whenever I try to interact with ...
1
vote
1answer
196 views

How can I map data points to OpenStreetMap (OSM) line data?

my goal is to filter measuring points of vehicles by mapping them to streets. So I could filter out all the false data located in fields and rivers and so on. I imported my data into a PostGIS ...
1
vote
1answer
984 views

How to create shortest route and multiple routes service using openlayers?

I created a digital database of many important features and locations of my city. and I want to create a web application in which shortest distance between two locations can be calculated and ...
1
vote
1answer
396 views

Problem connecting to localhost PostGIS

When I try to connect to a small localhost PostGIS database using QGIS, I get the error message: FATAL: no pg_hba.conf for host "fe80::4528:3236:418a9e7b%10" user "postgres", database "nyc", SSL off ...
1
vote
2answers
233 views

How to remove shapefile from PostGIS

I added a shapefile to the PostGIS using, ogr2ogr -f PostgreSQL PG:"host=server_ip user=username dbname=dbname password=password" yourshapefile.shp; Now I want to remove it. What is the command ...
1
vote
2answers
2k views

How to offset point perpendicular to line direction in PostGIS

I have a postgis table of points, that are sitting on road centerlines (I've linear referenced them). And the second table with road centerlines themselves. The point table also has a field roadid and ...
1
vote
3answers
415 views

Java shared hosting with PostGIS

I've been developing a disaster risk management application that makes use of Java/Smart GWT, PostgreSQL/PostGIS, and Tomcat 7. I'm looking for a shared hosting environment for the beta testing period ...
1
vote
0answers
2k views

Error when importing shapefile to Postgis database

I was trying to import shp to postgis database and i get the following error: Importing with configuration: adresy92, public, geom, C:\Users\tomek\Desktop\adresy92, mode=c, dump=1, simple=0, ...
1
vote
0answers
1k views

how can we save vector files in openlayers

i'm using Postgis + tomcat + geoserver + openlayers for my application. with the help of some tutorial i have reached upto gettting feature information of layers. Next i want to edit and save ...
1
vote
1answer
102 views

Which SRS is computational more effective to store continental scale data? (given some conditions)

For a Precision Agriculture application I need to make calculations in UTM projection. The data will be stored in Postgis and is made of soil samples results (point data) and field boundaries of many ...
1
vote
1answer
1k views

Mapserver/PostGIS Query Error

I'm having some difficulty understanding the error I am getting from my mapserver/postgis program. I have the following map file: MAP # start of map file NAME "sample" EXTENT ...
1
vote
1answer
3k views

Problem inserting Geometry into PostGIS Table

I am new to Postgis and I have imported a shapefile containing point layer into the postgis, and the SRID i had chosen was 4326. now while inserting the values into the table I am getting problem. My ...
1
vote
4answers
740 views

Failing to build PostGIS on OS X 10.7 Lion

I am trying to install postGIS from source to match the default install of postgreSQL on OS X 10.7. I installed GEOS and PORJ.4 from Kyngchaos and ran $export MACOSX_DEPLOYMENT_TARGET=10.7 $export ...
1
vote
1answer
141 views

Get relative north aligned point 2163 (US Equal Area)

What I'm trying to do is create a grid where the y axis is north aligned. I have a origin Lat/Lon point which is the bottom left corner of the grid and each cell should be 100 by 100 meters. So I ...
1
vote
2answers
650 views

PostGIS - certain MultiPolygons cause “BOOM! Could not generate outside point!”

I've just posted this at StackOverflow and someone suggested I try here. Original: http://stackoverflow.com/q/5863859/246265 I'm trying to represent a rectangular area which crosses 180 degrees ...
1
vote
1answer
544 views

Circle features missing in PostGIS after import from ArcGIS using ogr2ogr

I have a ArcGIS feature class of geometry type polygon. It was created as a convex hull with a 200 meter buffer on a point dataset, aggregating rows on a particular field. The number of points used to ...
0
votes
0answers
26 views

pgRouting 2.0 shortest path with pgr_dijkstra returns an empty result

I've been trying to automate shortest path finding for a list of points (on pair at a time) using the OSM road layer for Sri Lanka. I'm using pgrRouting 2.0 and have followed the instructions here. ...
0
votes
0answers
54 views

From a point find the closest line [duplicate]

I tried to find a LineString from my table road the nearest line to a point I give, but it is return me all the table SELECT gid, ST_Distance(ST_Transform(ST_GeomFromText('POINT(39.240443 ...
0
votes
0answers
45 views

R PostGIS convert SpatialPolygon to PostGIS table

I've been having some success in scraping some webdata and converting it from HTML to spatial data as originally asked here: Parse PHP/HTML to shapefile or similar I've been using R to both fetch the ...
0
votes
1answer
273 views

PostGIS Column has Z dimension but geometry does not

I am able to create a geomtry column for 3d multiline using this: CREATE TABLE trajectories ( gid serial NOT NULL, vehid character varying(10), state integer, geom ...
0
votes
0answers
87 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
1answer
92 views

How can I find the segment of a line that lies within a polygon using Postgis?

Given a "road", represented by a line, that crosses a "state", represented by a polygon: What is the SQL query I can use to find the segment of the road that is within the state? A concrete example. ...
0
votes
2answers
182 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 ...
0
votes
0answers
13 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 ...
0
votes
1answer
414 views

Will MapInfo only read PostGIS data that has been loaded via EasyLoader?

NMZ says in this thread that MapInfo will only read data in PostGIS that has been loaded by MapInfo's EasyLoader. I wasn't sure if this was still the case so I've loaded data into postgis via ogr2ogr ...
0
votes
1answer
168 views

overlay my shapefiles stored in database to the web/browser [duplicate]

I am very much strrugling on how to display my shapefiles stored in postgis database to the browser or to the web.. is there anyone there knows how to do it.? I am using geodjango framework in ...
0
votes
1answer
198 views

Aiming to retrieve source and destination from Android, use pgrouting dijkstra to find shortest path and display it back on Android

I have created an Android application that will accept source and destination from the user. It then calls a php page which takes in the lattitude and longitude of the destination and the source. I am ...
0
votes
1answer
155 views

How to automatically convert line features into polygons using QGIS/PostGIS?

I have a master table of line features and a number of tables that I use to join (in the SQL sense) to produce various layers. Some of theses layers consist of boundaries of administrative zones ...
0
votes
1answer
116 views

cartodb: query for the points within a radio from another point - postgis

I've georreferenced a couple of points in a CartoDb table, so now I have a the_geom column of type point I'd like to get all the points that are x meters away from a certain x,y point. So far now, ...
0
votes
1answer
626 views

PostGIS error reads “Geometry has Z dimension but column does not” [duplicate]

I try to store a polygon in GeoJSON format into my PostGIS table. Both are using the CRS EPSG:3857. This is how the polygon is defined. Note that I put in some whitespace to make it more readable. { ...