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

learn more… | top users | synonyms

3
votes
1answer
596 views

ArcGIS Flex Polygon to PostGIS Polygon

ArcGIS supports building polygons within the flex component that contain self-intersecting rings, as well as rings that touch at multiple points (breaking the "arbitrary" rules here: ...
17
votes
5answers
3k views

How do you best deal with data that spreads across UTM Zones?

I have data that spreads across two UTM Zones GDA/MGA94 UTM Zone 55 and 56. I have layers such as a cadastre, roads, pipelines etc where I want to store measurements like lengths and areas in metres ...
18
votes
4answers
2k views

Generalisation Strategies for Building Outlines

I have a dataset of building footprints vectorised from a raster dataset. The dataset is currently just a vector representation of the raster data. I would like a polygon dataset that only has ...
5
votes
1answer
298 views

GIS project advice

Hello: I have the following: Shapefile of the world with the boundaries of each country Successfully imported shapefile into PostGIS database Can display map of the world in a browser via ...
9
votes
3answers
1k views

How to populate an undirected graph from PostGIS?

This question is more related to resources that I might not have identified yet, although I've been searching the web for a while. In the project I'm working at the moment I need to run a ...
20
votes
4answers
2k views

Would PostGIS offer an advantage over MySQL for a produce farm application?

I have a web app that stores the locations of farms in West Michigan. You can search for a product (e.g. "broccoli") and it will show you all the farms that grow that product. Right now I'm using ...
3
votes
1answer
424 views

Is QGIS compatible with PostgreSQL 8.4 Advanced enterprise DB with Oracle compatibility?

Sorry for such a long question. We are trialling EnterpriseDB Postgres Plus Advanced Server 8.4 with Oracle compatibility and PostGIS 1.5.1. I can create a connection to the database in qgis and the ...
52
votes
8answers
4k views

How do I get started with PostGis

I have been reading a lot about it, but I am struggling to find a good beginner's guide. Which tutorials/books do you recommend? My past experience involves python and arcgis. But I have never worked ...
11
votes
6answers
617 views

PostGIS: Assign ID of point in layer A to closest point in Layer B

This should have been an obvious precursor (that I didn't ask) to my other question: PostGIS function to create spider diagrams? If I do not know the relationship between a point in layer A (stores) ...
4
votes
1answer
388 views

Remove ArcSDE repository and associated files from PostGresql DB

A bit of background first. I have a PostGres DB with PostGIS, I also have ArcSDE installed in this DB and all feature classes created through ArcSDE are using the PG_Geometry. Everything works well! ...
5
votes
3answers
1k views

How to create spider diagrams (hub lines) in PostGIS?

I'm rather new to PostGIS but I have done a lot of reading. One thing that I have been searching for is a function that allows users to create a "spider diagram" (also called "desire lines" or "hub ...
8
votes
1answer
633 views

How do I add an offset to a lat/lon to get a new point using PostGIS

Using PostGIS I have a lat/lon point and want to add an east/west and north/south offset in metres to get a new point. Is that possible?
7
votes
3answers
764 views

Looking for a basic PostGIS viewer to use as basis for own application

I'm looking for a rather basic PostGIS viewer. It should be possible to pan, zoom and retrieve coordinate information on mouse click. No need to support coordinate transformations. It should introduce ...
3
votes
3answers
487 views

PostGIS + ArcSDE mixed environment

I'm trying out a mixed environment here at work with PostGIS and ArcSDE together. I'm having some problems creating feature classes with custom SRIDs. I imagined that all that I needed to do was ...
29
votes
2answers
1k views

What coordinate system should be used to store geography data for celestial coordinates?

I am doing an astronomy project. I want to have the information about our images stored in a spatially enabled database. This, I would think, should be a very easy special case for GIS functions ...
2
votes
1answer
2k views

Add a polygon to PostGis from Google Maps

i have some experience with Google maps api, I have an app and currently calculate nearest points to locations via distance functions (great circle) and having a lot of waypoints on MySQL. I want to ...
1
vote
2answers
839 views

GeoServer GetLegendGraphic request ServiceException

I have a layer in GeoServer which is stored in a PostGIS database. The geometrytype of the layer is GEOMETRY and now the table only contains LINESTRING. But I what to add points and polygons to the ...
17
votes
2answers
1k views

Moving a PostGIS Installation

I have a simple question: I have a postGIS installation running on an old computer that I'd like to move. I spent a bunch of time playing with pg_dump and pg_dumpall without success. It seems the ...
2
votes
1answer
622 views

Routing Application in Windows

I am making an routing web application similar to Google Maps 'Get Direction' feature. But because of the limited control and data on GMaps, I decided to use OpenStreetMap instead. This also made me ...
5
votes
2answers
2k views

Geoserver Routing with OSM data and PostGIS

Does Geoserver have a routing functionality for the OSM data in PostGIS?
4
votes
2answers
492 views

Data entry and manipulation using web pages

I am working on a project where we want to move a database from Microsoft Access to PostGIS, and we want the data entry forms to be web page based rather than forms within the Access database. I am ...
17
votes
4answers
8k views

How to get the nearest point on a linestring to a given point?

I've been using PostGIS in a long time now but never had to use the LINESTRING geometry ... yet! :) Here's what I would like to do : I have a table of linestrings (representing streets of a given ...
4
votes
2answers
1k views

I want to edit corresponding postgresql data of a vector from openlayers- how to do it?

I want to edit the corresponding text/numeric data type columns of a vector through openlayres, when a user click/mouse over a vector. like, http://dev4.mapgears.com/bdga/bdgaWFS-T.html# any ...
2
votes
3answers
2k views

Render vectors from OSM data in POSTGIS database

I'm a newbie when it comes to mapping application. I had successfully loaded my OpenstreetMap data in a Postgresql/PostGIS database. Now my problem is how to render the vector data (the POI's, ways, ...
4
votes
5answers
3k views

Problems in installation of PostGIS

I will be installing PostGIS for my project using PostgreSQl (OSM) in Ubuntu 9.04. I had all the requirements prior to the installation (PostgreSQL, Proj4, GEOS). When I unzip the PostGIS tar, then ...
5
votes
2answers
1k views

Geodatabase to PostGIS character encoding

Similar to another question I posted previously, I'm trying to import datasets from Esri geodatabases into a PostGIS database directly, and inside the data there are greek letters and symbols that are ...
5
votes
2answers
797 views

How does shp2pgsql define schema?

Can anyone explain how it is that the shp2pgsql loader for loading shapefiles into PostGIS goes about defining the schema for a table when importing a shapefile? To further explain, shapefiles are ...
8
votes
2answers
2k views

How to convert OSM Data to PostgreSQL for Routing Purposes?

I'm creating a routing application using OpenStreetMap. Currently, my task is to convert the data from an OSM file to PostgreSQL. I read about osm2pgsql, but the problem is it says there that ...
10
votes
2answers
3k views

How to import esri Personal Geodatabase (.mdb) to PostGIS on Linux

We have esri Personal Geodatabases that we need to import into PostGIS. Ultimately, we'd like to allow people to upload an MDB on a web server, and have it import the layers into PostGIS. On ...
4
votes
1answer
2k views

Using PostGIS with Rails

I'm new to postGIS, and am looking to use a spatial database with my Rails app (specifically, to retrieve points from the database that are within the bounding box of a Google Maps viewport). I posted ...
8
votes
2answers
655 views

Splitting polylines using regions with PostGIS

I was wondering if it is possible to split a polyline on polygon boundaries (regions) in PostGIS, the picture below is of what we have at the moment and showing where I need the polylines split: ...
8
votes
1answer
1k views

PostGIS 3D in Action

I was wondering if there is a website that showcases Openlayers and PostGIS 3D in Action
11
votes
3answers
6k views

Is there a dissolve function in PostGIS other than st_union?

I'm looking for a function to dissolve shared boundaries between polygon features in a table. ST_UNION() almost does what I'm looking for, but it creates a multipolygon from all polygons in the layer ...
4
votes
2answers
840 views

ArcSDE 10 and PostgreSQL 8.3 vs 8.4

We have recently upgraded our ArcSDE 9.3 instance to ArcSDE 10. I was hoping to upgrade postgresql 8.3 to 8.4 at the same time. Although ArcSDE 10 supports 8.4, it turns out that the ArcSDE wizards ...
12
votes
4answers
3k views

How to create one-sided buffers or parallel lines in PostGIS?

I'm looking for a way to create so-called one-sided buffers or parallel lines in PostGIS. Example: 1. buffer, 2. one-side, 3. both-sides I've found some discussion on the mailing list from 2009 and ...
19
votes
7answers
8k views

Options for displaying PostGIS vectors in OpenLayers

I am very new to web-mapping, so this question may be a little misguided. I want to have a very simple web interface using OpenLayers (or even Google Maps if that will be easier) which can display a ...
2
votes
6answers
2k views

How can I connect to a PostGIS database from ArcCatalog 9.3 via ArcSDE?

I have a problem connecting to my postgis database via ArcSDE in Arc Catalog. When i want to establish connection to my database i get an error:
8
votes
4answers
1k views

Queries returning very big datasets in PostGIS

I have a PostGIS query that will return several million rows: SELECT t1.id AS id1, t2.id AS id2, ABS(t1.mean_h - t2.mean_h) AS h_diff, ST_Distance(t1.the_geom, t2.the_geom) AS dist FROM ...
9
votes
2answers
1k views

What are the implications of invalid geometries

I've imported some data in a Postgis database and some of the geometries are reported invalid (ST_IsValidReason reports self-intersection or ring self-intersection). The queries I am performing don't ...
8
votes
3answers
2k views

How to emulate Google Maps driving directions using pgRouting?

Would like to emulate google maps' driving directions functionality but use pgRouting instead. google's data over the project area & scale is quite a bit off so we want to use our own transport ...
3
votes
4answers
3k views

Live KML from PostGIS to Google Earth

I was wondering if anyone knew a way to bring data from a postGIS database into Google earth to view live. I know of the asKml function in PostGIS, but I'm interested to know if anyone had managed ...
16
votes
2answers
4k views

How can I find a point inside a polygon in PostGIS?

How can I find a point that is guaranteed to be within a given polygon in PostGIS? I am aware of the ST_Centroid function. However, the centroid is not always within a polygon, see below: ...
15
votes
2answers
3k views

How can I calculate the bearing between two points in PostGIS?

How can I find the bearing between two points in PostGIS? Please specify in your answer whether or not the method producing a bearing on the spheroid, or a planar bearing.
2
votes
4answers
3k views

struggling with GeoDjango install: ERROR: could not access file “$libdir/postgis-1.5”: No such file

I'm installing GeoDjango on Mac OSX. I've followed the official Mac install instructions, which all went smoothly, and am now creating a spatial database template for PostGIS. However, when I try to ...
6
votes
2answers
1k views

Unions of polygons (Postgis ST_UNION for Geography type)

I am looking for a function that will return the intersection of 2 or more polygons (geography type). I am aware of ST_UNION, ST_COLLECT but it works only for geometry type. Any tip will be really ...
1
vote
1answer
820 views

psycopg2 error with QGIS 1.5

So I just installed QGIS 1.5 using the windows installer not the osgeo4w one and now any plugins that need access to PostgreSQL databases don't seem to work, they all throw a: "Couldn't import Python ...
2
votes
1answer
443 views

How to convert SHP/POSTGIS data into x, y, z, “cost” data?

Is there a way to convert a line layer (shp or PostGIS) data into (x, y , z, cost) i.e. (From_node, To_node, optional_Elevation, Cost/Weight) ?
3
votes
3answers
2k views

Writing a plugin for Qgis using python to access PostGIS and write geometries

Sorry about the strange title didn't really know how to word it. I currently use MapInfo to do most of my GIS work however I have recently installed PostGIS 1.5 and am really liking it so far. A ...
18
votes
7answers
6k views

Nearest neighbor between a point layer and a line layer

I've asked this question several times on stackoverflow and irc between #qgis and #postgis and I also tried to code it or implement it my self in postgis with no real answer. Using programming (most ...
3
votes
1answer
558 views

Find polygon that contains all linestring records in PostGIS table

I'm still pretty new to this stuff, so bear with me. In PostGIS how could I find a polygon that would contain all the linestring records in a given table?