Questions tagged [postgis]
PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.
7,899
questions
3
votes
1answer
587 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 ...
85
votes
5answers
15k views
Getting started with PostGIS?
I have been reading a lot about PostGIS, but I am struggling to find a good beginner's guide.
Which tutorials/books do you recommend?
15
votes
6answers
1k 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:
How to create spider diagrams (hub lines) in PostGIS?
If I do not know the relationship between a point in layer A ...
4
votes
1answer
462 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!
...
8
votes
3answers
3k 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 ...
9
votes
1answer
1k 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?
8
votes
4answers
1k 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
607 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 ...
37
votes
2answers
3k views
Choosing coordinate system 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 ...
3
votes
1answer
3k 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
1k 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 ...
21
votes
2answers
2k views
Moving a PostGIS Installation
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 normal dump procedures don't ...
2
votes
1answer
709 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 Google Maps, I decided to use OpenStreetMap instead. This also made ...
5
votes
2answers
4k views
Geoserver Routing with OSM data and PostGIS
Does Geoserver have a routing functionality for the OSM data in PostGIS?
4
votes
2answers
665 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 ...
29
votes
4answers
18k views
How to get the nearest point on a linestring to a given point?
I've been using PostGIS for a long time now but never had to use the LINESTRING geometry ...! :)
Here's what I would like to do : I have a table of linestrings (representing streets of a given city, ...
4
votes
2answers
2k 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 ...
3
votes
3answers
4k 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
6k 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 './...
6
votes
2answers
3k 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 ...
7
votes
2answers
1k 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 ...
10
votes
2answers
4k 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 ...
15
votes
2answers
4k 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
996 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:
Lets ...
8
votes
1answer
2k views
PostGIS 3D in Action
I was wondering if there is a website that showcases Openlayers and PostGIS 3D in Action
24
votes
3answers
20k 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
879 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 ...
19
votes
4answers
6k views
Creating 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 ...
22
votes
7answers
10k 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
3k 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 ...
7
votes
3answers
931 views
How to get a list of adjacent lots to a road in ArcMAP and PostGIS/QGIS?
In the following map, I have:
A line / road layer
A parcel / lot layer
The Task:
Find and count the list of lots adjacent to the road with their types (parcel_type is a field in the parcel layer)
...
16
votes
2answers
4k 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 ...
9
votes
3answers
4k 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 ...
6
votes
4answers
5k views
Live KML from PostGIS to Google Earth
Is there 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 to hook up a kml so that ...
22
votes
2answers
11k 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:
...
19
votes
2answers
7k 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
6k 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 ...
7
votes
2answers
3k 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.
1
vote
1answer
1k 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 ...
3
votes
1answer
456 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) ?
4
votes
3answers
3k views
Writing a plugin for QGIS using Python to access PostGIS and write geometries
Sorry about the strange title, I 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 I really like it so far.
A ...
37
votes
7answers
21k views
Nearest neighbor between point layer and line layer? [closed]
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
679 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?
25
votes
4answers
6k views
Simplifying adjacent polygons using PostGIS?
I encountered a problem simplifying set of polygons that are adjacent. If I simplify each polygon separately with the DouglasāPeucker algorithm (which is used by many open source tools), the resulting ...
16
votes
5answers
5k views
Simplifying polygons to linestring?
I would like to simplify some polygons that represent rivers into linestrings. I assume that holes in polygons can be omitted. Anybody has some good idea how to simply do it?
It would be nice, if it ...
37
votes
21answers
32k views
Connecting to PostGIS database from ArcMap for display and query without ArcSDE?
How can I connect to a PostGIS database from ArcMap using ArcGIS Desktop 9.3 and later?
I would like to be able to perform spatially enabled queries and receive the results back (e.g. spatial and non-...
37
votes
4answers
12k views
Separate polygons based on intersection using PostGIS
I have a PostGIS table of polygons where some intersect with one another. This is what I'm trying to do:
For a given polygon selected by id, give me all of the polygons that intersect. Basically, ...