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

learn more… | top users | synonyms

4
votes
1answer
230 views

Reclass all values < 0 to -9999 in PostGIS

I have a tiled raster in a PostGIS table and I would like to change the value of all pixels which have values less than 0 to -9999. How should I do this? I suspect it involves ST_SetValue and ...
6
votes
3answers
1k views

How to get distance & bearing between a point and the nearest part of a polygon?

I am fairly new to writing SQL and using PostGIS so apologies if this seems a bit simple or obvious. I have a table of polygon features held in a postGIS database and I need to write an SQL query to ...
2
votes
0answers
315 views

Parcel ID Mapping (brainstorming)

In my project I have a table full of residential properties by Parcel_ID. Table 2 is a TIGER streets shapefile. I would like to build a query in MS Access displaying all properties within a mile ...
1
vote
2answers
306 views

postgis, mapserver & openlayers: if data is not in table give an error / pop-up

I have created a website with postgis, mapserver & openlayers. On the website you can enter a postal code and then a drivetime isochroon is created. The problem now is that you can enter ...
1
vote
1answer
781 views

Create closest point on multilinestring to use in shortest_path()

I am working a routing based application where I need to create a route between two points of interest. The problem which I am facing occurs after calculating network topology using ...
4
votes
3answers
217 views

PostGIS Uploader - Need Many .shp files in One table

How do I put many shape files into 1 table? The PostGIS plug-in shape file uploader makes one seperate table each time it uploads a shape file.
1
vote
1answer
970 views

PostGIS query with Lon Lat

Need SQL syntax for ... I have a table with individual polygons like a jigsaw puzzle. Given a Lon Lat, I need to find the polygon where the lon lat in located. I am trying: select * from ...
10
votes
1answer
3k views

Merge Multiple Tables into a New Table in PostGIS

I am looking to merge a number of individual tables into a new table in PostGIS. This is an easy task when working with Shapefile data, but I am unsure how to do this in PostGIS. Any help would be ...
8
votes
2answers
258 views

Moving existing hard drive with PostGIS data directory to a new computer

I have a new computer that is replacing an old machine that has PostGIS installed. The old computer has a 2nd hard drive where the PostGIS data directory is stored. I want to move this drive over to ...
1
vote
4answers
2k views

Joining 2 tables to create layer in Geoserver with MultiPolygon and Point data types

I got problem when using the SQL View function. My objective is to create layer in geoserver from joining 2 tables. I have 2 tables, table_a: Table "public.table_a" ...
4
votes
2answers
504 views

Programmatically setting a layer's bounding box in Geoserver

I have a system built on PostGIS/GeoServer/OpenLayers. Data (a ship's voyage track) is inserted into the database in real-time - a bunch of variables and point geometry type. This is served up via ...
2
votes
2answers
1k views

Why am I unable to publish a postgis layer to geoserver?

I left arcgis and microsoft sql and now I am trying to connect Qgis+PostgreSQL (PostGIS) + GeoServer. I've brought my postgis database to the server, created a "store". And now I'm trying to publish ...
1
vote
0answers
81 views

Make a thumbnail of a raster in PostGIS

I'm fiddling around trying to create a thumbnail of a fairly large (originally 27MB) raster, chunked into 64x64 blocks. I've got the following and it works, quite well, but I'm wondering if there is a ...
4
votes
2answers
2k views

How to setup PostGIS JDBC with Hibernate?

I try to setup an Java Application with Hibernate and PostGIS but I always get nasty exceptions like : java.lang.NoSuchMethodError: org.hibernate.type.CustomType.<init> ...
2
votes
1answer
242 views

Query for segments at same place and time in PostGIS

A newbie-question: I've imported the segments of several GPX-Tracks in a PostGIS-Table. Now I'm looking for a query that returns all segments that: are spatially overlapping (within a specific ...
2
votes
3answers
474 views

How to pull lat/lng from a map canvas and update a database

So if i want to pull out lat/lngs after user clicks on a map canvas (lat/lngs are pulled using any javascript API (leaflet, wax etc.) and add this to a postgresql database using a query, how do i do ...
3
votes
1answer
310 views

gdalinfo gives no georeferencing information for a PostGIS raster

I have a PostGIS raster dataset which I am trying to access via GDAL. I've had various problems with making this work, so thought I'd try running the gdalinfo command to check that GDAL can actually ...
4
votes
3answers
856 views

Create Spatial Index in PostGIS on an entire Schema

I have loaded a number of shapefiles using SPIT (QGIS plugin) to my PostGIS database. These layers did not have a Spatial Index created upon loading. I am wondering if there is a way to create a ...
3
votes
1answer
587 views

PostGIS 2.0 ST_Transform with Rasters cannot find custom SRID

I'm trying to calculate an average value in a buffer around a point. Given a raster in EPSG 4326 and a similar point, this is fine, except that the values will be skewed as they are not projected in ...
2
votes
1answer
520 views

How to transform ETRS to EPSG?

I have data in the ETRS 89 LAEA format (SRID: 3035). But I have problems to transform it. Example data: N2736 E4541 I want to transform it to EPSG WGS84 (SRID: 4326), to check the coordinates on ...
3
votes
1answer
2k views

convert list of points to line or polygon

I have a list of Points in a PostGIS table. The rows can be grouped by a date something like: myTable id INT date DATE lat NUMBER lng NUMBER geom GEOMETRY(POINT) now I need a table where all ...
4
votes
1answer
514 views

Importing multiple shapefiles with tablespace and inheritance defined

In the UK we are very fortunate to have the Ordnance Survey who provide the whole of Britain in vector format. The data is provided as over 60 tiles, each of which contains something like 16 ...
1
vote
1answer
218 views

What are AGF Files, how do we put them in PostGIS?

I came across term which says AGF, after Googling I found its Autodesk Geo Files, But some other say, Atlas Geo Files, Which one of them is right. I also came to know that It is an extension to WKT ...
1
vote
1answer
128 views

Does anyone know, what heuristic function is used in a*?

Does anyone know, what heuristic function is used in a*? May i change that heuristic in a* ? and how i change it? Here some heuristic, Euclidean distance, Manhattan distance, Maximum distance ...
1
vote
0answers
190 views

PostGIS reports invalid Curve GML

PostGIS version POSTGIS="1.5.3" GEOS="3.3.1-CAPI-1.7.1" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.3" USE_STATS Postgresql version PostgreSQL 9.1.2 I'm having issues inserting Curves into a ...
0
votes
2answers
1k views

How to properly install Cartaro GeoCMS?

I have been trying to install Cartaro the drupal GeoCMS for a while without success. I have properly installed Geoserver (running fine), Postgresql and postgis 1.5 enabled but when i try to install ...
6
votes
2answers
382 views

Do large vertex counts cause performance issues?

I have a table of several thousand tuples - each tuple has a geometry column. The problem is, these geometries have a large vertex count. The max vertex count is 400, while the average is 200. ...
4
votes
3answers
3k views

How to fix “spatial_ref_sys relation does not exist”

I am trying to install postgis in my database. I compiled the library successfully. Now when I try to import the sql spatial_ref_sys is shows the error that spatial_ref_sys relation does not exist ...
2
votes
1answer
2k views

How can I remove old partially installed postgis 2.0 from Mac?

I am trying to install postgis in mac using brew. However it shows that postgis-2.0.0 is already installed. Actually I tried to install it from source. Up to configuration it was fine but when I did ...
11
votes
5answers
10k views

How to create PostGIS template?

I am following a tutorial to install pgrouting. However, I didn't get the part when it says Start pgAdmin and create a new database based on your PostGIS template Where can I get this postgis ...
1
vote
1answer
313 views

Geographic Web Service

I was told to implement a web service which, given 2 inputs (street name, cross street name) the output is the crossing geographical coordinates. What is the best way i should go? Is there a standard ...
3
votes
1answer
3k views

Calculating area of an EPSG:4326 Polygon [duplicate]

Possible Duplicate: What is the most accurate coordinate system for calculating areas of polygons? In our Postgres/Postgis database we store polygons in a column defined as ...
8
votes
1answer
2k views

One to Many Relationship in QGIS with PostGIS

Does anyone know of any tool that can do a One-to-Many relationship in QGIS. I have my data in a PostGIS database. I would like to be able to query spatial layers that are related to spatial or non ...
2
votes
1answer
204 views

Simple GIS to Provide Urban Boundaries

I have an app built on top of Google Maps right now and everything works great. I want to add one feature that seems exceedingly difficult. On my site, I want users to be able to type "Boston, MA" or ...
0
votes
1answer
315 views

How to get points in bounding box by degrees for map

I have some concerns about working of BOX3D PostGIS function. I tried to find places in square -158.721365889063 66.09275164148659, 154.608712235937 52.56807548751039(degrees). But this where ...
6
votes
1answer
3k views

PostGIS - 1.5 to 2.0 easy update

I have a PostGIS 1.5 database and want to update to 2.0. I read that because this is major release I have to follow the 'Hard update' procedure. However the spatial data I have is only test data so I ...
1
vote
0answers
540 views

How to display indoor map using OpenLayers?

I created my osm file in JOSM, and i imported it to my database by osm2pgsql tool. I created new layer in my osm.xml file, which selecting data with query: select way from planet_osm_line, (select ...
4
votes
1answer
277 views

How to update attribute values of points outside an area?

I have two datasets in PostGIS 1.5 (on Postgres 9.1) one of polygons and one of points. I am hoping to create a SQL command that will select all of the points in a dataset that are not within of the ...
2
votes
1answer
545 views

PostGIS - table with 3d points with fast ordering by distance

I am pretty new to PostGIS and I am trying to solve the following problem. I need a table with 3D points (x,y,z) that will contain around 1-10million points. I want to be able to efficiently ask the ...
11
votes
2answers
2k views

What is the Difference between Geometric and Geographic columns? [duplicate]

I am a beginner in GIS and Learning PostGIS. I came across this two terms Geom and Geog, Could anyone explain in brief. What is the best to use with map data and Do all functions support both Geom and ...
1
vote
2answers
184 views

Toggle editing option in plugins

I am working on python plugins for QGIS.I developed the plugins same as RT SQL LAYER plugins. When we draw the layers using query builder of "Add Postgis Layer" option,toggle editing option is ...
2
votes
2answers
146 views

Does PostGIS/pgrouting actually come with street info?

I've been looking at getting a new GIS setup going, involving QGIS/PostgreSQL/PostGIS/pgrouting, and so far it has been relatively easy. One thing I want to be able to do is to work out travel times, ...
1
vote
2answers
2k views

making maps using Qt

D maps using Openstreetmap data with the help of Qt. I need to use Qt specifically as other components in the software have objects that integrate into the map using Qt. How should I proceed? Can I ...
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
0answers
849 views

Geometry contains non-closed polygon: GeoServer output from PostGIS

I have imported a shp file using PostGIS shapefile loader plugin for pgAdmin3. The geometry type of the table created is MultiPolygon. I have cross checked the same using the following query. SELECT ...
2
votes
3answers
389 views

PgRouting routing algorithm from start to end via nodes with restrictions

I have the following situation: I want to find the shortest route from A to B through nodes (C,D,E, etc.) with turn directions and road type filtering. Is there a way to accomplish this using ...
3
votes
1answer
3k views

How to filter features in a layer?

I am trying to display certain features in a shapefile-based layer using QGIS. I have found the subset function in the properties panel, which does exactly what i want, but is too tedious given that I ...
3
votes
1answer
502 views

Making calls the PostGIS functions with Java

We have Java stored procedure in Oracle that make calls to functions offered by Oracle Spatial to perform spatial analysis and return results. I am looking to the same in PostGIS, is this possible?
4
votes
1answer
613 views

Spatial Join in PostGIS according to Line Attribute

I am in the process of building a data warehouse in PostGIS, that will store the length of the road network of a country (Lines) per Administrative Area (i.e. Province or State, referred to as AA ...
8
votes
2answers
591 views

How to speed up space partitioning in postgis?

I've a bunch of overlapping polygons and I'm trying to partition the space to avoid having overlapping ones. I think my problem is fairly simple. Using some ESRI product and ...