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

learn more… | top users | synonyms

4
votes
2answers
1k views

Convert KML to shapefile without losing attribute data

So I want to convert KML files to SHP shapefiles to load it onto PostGIS. Currently I'm using ogr2ogr to do the conversion for me, but it wipes out all the attribute data. How do i preserve this ...
5
votes
1answer
871 views

SQL Query to Reverse Geocoding in PostGIS

I try to do Reverse Geocode from my shapefile on the database. I'd already try with Spatialite and PostGIS to put shapefile (.shp) into it. But I'm still can't delivered my objection about reverse ...
5
votes
2answers
1k views

How are housenumbers and streets linked in a OSM based PostGIS DB?

I'm trying to understand how OSM is linking housenumbers and streets with each other. I downloaded an osm file for germany and imported it into a PostGIS DB. To understand how the linking is working I ...
1
vote
1answer
479 views

How to cast box3d_extent to geometry (Rare problem with Geoserver and Postgis)

I use Geoserver 2.1.3 and "POSTGIS="1.5.3" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.6" USE_STATS" on PostgreSQL 9.1 From time to time (well - today I can't get around ...
3
votes
1answer
2k views

How to find the nearest point projected on the road network?

I would like to know if there is a function at pgRouting that given a point (lon/lat) can give you the projection of that point to the road network . Thanks in advance john
2
votes
2answers
3k 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 ...
3
votes
1answer
2k views

How to get the coordinate system from a PostGIS database?

My question is probably amazinlgy stupid, but I can't find the answer myself. I would like to extract from a database the latitude and longitude of points. For now, I'm getting x(the_geom) and ...
0
votes
0answers
487 views

How to load postgis layer to map control with mapwingis?

I search over the internet but couldnt find out the resolution. I create GIS app with MapWinGIS library, I have some spatial table in PostgreSQL (table with geometry column). I want to load these ...
8
votes
3answers
3k views

Editing PostGIS/GeoServer data via web?

I've got PostGIS installed and would like to create a web application to do some simple edits: Draw manually (over a Basemap) points, lines and polylines, using snapping points (points, end of ...
1
vote
1answer
2k views

How to connect ArcGIS Destkop 10 with PostGIS [duplicate]

Possible Duplicate: How can I connect to a PostGIS database from ArcMap 9.3 and 10.0? I've installed postGIS 1.5.3, and would like to connect it from ArcGIS Destkop v10. Which is the best ...
8
votes
1answer
650 views

How to Simplify a Line Network Preserving Topology?

I have a Shapefile (consisting of European major roads) with about 250.000 Segments which I have to simplify for pgrouting. But I can't seem to find a way to do that properly. This is what it looks ...
0
votes
1answer
128 views

Postgis reorder mixed up linestring chunks / max_segment_length(linestring)?

I imported ~1000 paths from somewhere into my postgis database to a linestring field. I had the problem that the paths were divided into chunks, and those chunks were mixed up in some cases. Suppose ...
2
votes
1answer
350 views

When creating a new raster, how to determine a raster's upperleftx, upperlefty?

I'd like to create a raster from point data, averaging the point data over a given area and placing the results into a given pixel/cell. With each pixel/cell as 50m x 50m. I'm new to this and have a ...
3
votes
1answer
316 views

Is ST_GeomFromText better than providing direct geometry?

I have been working with postgis recently,and in my query if I use ST_GeomFromText it execute faster than running a sub-query to get geom. I thought ST_GeomFromText will be more expensive but after ...
3
votes
2answers
877 views

Generate non-overlapping shapes from a buffer

I have a collection of points, and I need to generate shapes around these points. Let's assume that these points are locations of offices and that the shapes are the 'area of responsibility' around ...
18
votes
1answer
3k views

Comparison of geocoding solutions (such as Gisgraphy & PostGIS 2.0)

As I am sure many of you are aware, PostGIS has finally released Version 2.0 and included within this version they have also built a geocoder (see: http://postgis.net/docs/Extras.html). Although I ...
2
votes
3answers
5k views

Beginner HELP please : How to add a WMS layer from GeoServer with OpenLayers?

After doing some basic OpenLayers examples where I used WMS layers from WMS providers like this: http://maps.opengeo.org/geowebcache/service/wms, I wanted then to add a WMS layer from my GeoServer. I ...
2
votes
2answers
1k views

How to create proper PostGIS points out of GRIB2 file?

I'm trying to load NCEP NOAA weather data from GRIB2 format into PostGIS and then visualize it using QGIS etc. I'm using wgrib2 library to convert the GRIB2 data to csv first. wgrib2 -match ...
2
votes
1answer
255 views

Programming a geoweb application for cloud. What does it imply?

I've recently started to develop a geoweb application using GeoDjango + PostGIS in the backend, HTML5 + JS in the frontend. I'm really at the beginning, so, I have time to change a lot of things. ...
4
votes
2answers
953 views

Changing Buffer table geometry dynamically in PostGIS using plain SQL

I have two tables in PostGIS, a point and a point_buffer table. The point table has a buffer_distance field, with a default value say 200. Now I want to change the buffer table geometry whenever I ...
8
votes
3answers
818 views

Which tool is recommended for a PostGIS design?

I need to create a design for a spatial database. I've found this list http://wiki.postgresql.org/wiki/GUI_Database_Design_Tools, but it seems to me that this software is orientated towards a regular ...
1
vote
2answers
1k views

Find end of arc given start/end angles, start point and radius

Using PostGIS, how do I work out the end point of an arc given the start point, start and end bearings (relative to true north) and radius of the arc? Eg. say I need draw an arc of 4000m radius from ...
1
vote
0answers
246 views

Manifold 'Link drawing to query' - can I do this in QGIS?

Manifold GIS allows the creation of dynamic drawings linked to queries. Unfortunately I do not have access to Manifold as my employer refuses to pay for it, so am currently investigating ...
1
vote
1answer
257 views

How to get route plan with certain distance with pgRouting?

I am working for a project. I have a road network which has been imported in PostgreSQL/PostGIS database. I can query shortest path between two points. I want to get route plan with certain distance. ...
3
votes
1answer
298 views

WMS and Raster Data

I am calling in some WMS layers using openlayers. One of the layers is a raster. I have it working fine. But how does this fit into the spatial database model? I thought a WMS is a protocol for ...
2
votes
2answers
1k views

Loading Postgis Layers in a desktop application using C#

I have layers in a postgis database that I can load in a MapWindows Control (ocx) using a npgsql connection and creating a shapefile using the geometry field in a Visual Studio .Net 2010 (C#) ...
1
vote
2answers
177 views

How to fix “Error, query must return columns 'id', 'source', 'target' and 'cost'”?

I have one spatial table with gid, FNODE_, TNODE_ and LENGTH column in my Postgresql/PostGIS database. I am using pgRouting. Problem is, when i try with shortest path query it shows following error. ...
2
votes
0answers
103 views

Symbolizing Layers from a PostGIS Database to many Client Computers

I was hoping someone could help with a symbolizing issue. I have a PostGIS database on a server with a number of layers. The layers of a series of polygons, lines and points that all share the same ...
1
vote
0answers
259 views

Live KML Feeds - From the Ground Up, How Would You Build It and Why?

I found the "Live KML from PostGIS to Google Earth" post very informative but a bit daunting for someone new to the open source world of products like PostGIS and GeoServer. If I am building the ...
4
votes
1answer
462 views

Can PostGIS functions be written in Java?

I am wondering if there is a possibility of programming new functions for PostGIS using Java, so that you can refer them same way as classic PostGIS functions are. Something like this: CREATE OR ...
2
votes
2answers
862 views

openlayers code PanZoomBar is not a constructor and GetFeatureInfo error

I’m having trouble with my openlayers code displaying postgis data in geoserver Why would this line (also PanZoomBar) map.addControl(new OpenLayers.Control.Scale($('scale'))); Produce this error in ...
0
votes
1answer
139 views

How to resolve case when routing result does not contain start and end point?

I have routing case shown on picture, SP=start point, EP=end point. A-----SP-----B------------C----------D--------E-----EP------F Routing result is BC, CD and DE. My points are not on route. I think ...
1
vote
1answer
969 views

POSTGIS query of point feature. How to find nearest point to query location?

I am querying a point feature using a POSTGIS request fired in Javascript. The decoded URL looks like this and returns great results for polygon features. ...
4
votes
2answers
4k views

How to display a PostGIS table on Google maps?

I am attempting to take a shape file and display it on a map: I can do something like this: SELECT ST_AsText((ST_Dump(the_geom)).geom) as the_geom FROM shapes; But the problem is I still have to ...
1
vote
1answer
244 views

PostGIS Raster convolution filters

I've looked through the PostGIS raster documentation, but can't find an indication of how to apply a convolution filter to raster data. Does this capability even exist (yet?) There only appears to be ...
1
vote
2answers
617 views

Storing Polygons in PostGIS (data coming from shape files)

We want to store data from shape files in PostGIS all in one table. There will be two columns in the table: boundary - The polygon data (How do we store this?) mongo_id - Links to a mongo database ...
0
votes
2answers
313 views

shp2pgsql srid 2262 polygons NOT in geocordinates

Imported the following shape file: shp2pgsql -c -s 2262 MCGIS_Towns_Villages public.towns | pgsql -d database Queried: SELECT gid, name,st_astext(the_geom) as the_geom FROM towns The ...
3
votes
1answer
2k views

display multiple vector layers from single PostGis table in GeoServer using OpenLayers — REWORDED

Prompting suggestions I’m going to attempt to reword my question I have a PostGis table that contains overlapping vector polygons. I need to display a selection in Geoserver and provide ...
1
vote
2answers
792 views

Projecting OpenStreetMap data in PostGIS

I've loaded an extract of Openstreetmap data into a Postgresql database with PostGIS 1.5 using the following command withosm2pgsql.exe: C:\Program Files (x86)\HOTOSM\bin>osm2pgsql.exe -c -s -H ...
2
votes
1answer
315 views

How can I put OSM data in a geography view in PostGIS?

I loaded the *.osm file to postgis with osm2pgsql. The data are stored in lat/long, so the same time I expect them to should be available in geography view, but they are not (only present in geometry ...
5
votes
1answer
2k views

How do I perform a proximity search with Postgis?

OK, so I downloaded the Geonames database (cities1000) and wrote a small Ruby program to import them into my table (geo_cities). I then added geography column called geog. So after all of that, I ...
1
vote
1answer
242 views

Ways and Vertices tables empty after osm2pgrouting tutorial

I've been following the osm2pgrouting tutorial, have compiled osm2pgrouting with necessary boost and expat libs installed, and built a postgresql db with support for postgis and pgrouting. Importing ...
1
vote
1answer
2k views

Issue merging multiple polygons using ST_UNION

Totally brand new at using PostGIS, my first post here on GIS. Apologies if the answer to my question is obvious! I've got regional data loaded into a PostGIS table and want to merge regions that ...
2
votes
1answer
901 views

How can I deploy a custom GeoTools datastore to GeoServer?

I'm using GeoTools v8.0 and GeoServer v2.1.3. I've currently built a working datastore connecting to a PostGIS database based off of the GeotTools' abstract datastore tutorial. After days of on and ...
3
votes
1answer
868 views

Failing to build PostGIS on Mac OS X 10.6.8 (Snow Leopard)

I'm getting the same problem expressed here Failing to build PostGIS on OS X 10.7 Lion But in Mac OS X Snow Leopard. Things I have checked include: PostgreSQL compiled to several architectures. I ...
2
votes
1answer
1k views

PostGIS UPDATE Statement with ST_Contains(table1.geom, table2.geom)

I'm strugeling with a query I should write to UPDATE my dataset. First of all, I have 2 tables containing data and I need to mix it. Tabel 1 -- lets call it names: name_str the_geom (points) ...
4
votes
3answers
605 views

WFS Caching / Back button

I'm using WFS protocol on Vector layer / GeoServer / PostGIS Currently the map is refreshing and calling new requests whenever i do anything like searching or drawing and when i move back to a part ...
3
votes
2answers
1k views

How to insert geometries from shapefile into existing table?

I'm running into a problem trying to figure out how I should insert a GIS coverage polygon into an existing table. I'm primarily using QGIS and the PostGIS Manager plugin to handle it. After some ...
1
vote
1answer
210 views

Not seeing the actual data value in getObservation response from MapServer 6

I'm experimenting with MapServer and SOS but I'm not getting back any useful data from the GetObservation call I'm doing. My .map file uses a Postgres query to get data and when I run that same query ...
4
votes
1answer
1k views

Union, Dissolve, Buffer — multiple layers, all in one step?

I'm a new user of Quantum GIS (1.7.3) and I need to repeat a task multiple times, so I'm wondering if there is a quicker way to do the following (with three or more polygon layers - each layer has a ...