Questions tagged [postgis]

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

Filter by
Sorted by
Tagged with
8
votes
1answer
502 views

Postgres/postgis cursors

I have a road network with StreetName and min/max address ranges for each segment (ie- StreetName = 'Main St', Min = 100, Max = 199). I also have individual address points with similar information (...
3
votes
3answers
1k views

Can you set the PostGIS SRID when creating a Feature class through ArcCatalog?

I have ArcSDE installed in a Postgresql database and I am using PostGIS geometry. I'm not a DB minded person so feel free to let me know if my process is not right. I create my feature class in ...
4
votes
1answer
652 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: http://postgis....
27
votes
6answers
12k views

Dealing 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 ...
22
votes
3answers
12k views

Seeking Generalisation Strategies for Building Outlines in PostGIS?

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
323 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 Openlayers....
9
votes
3answers
2k 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 shortest-...
23
votes
4answers
3k 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
573 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
9answers
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
461 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
604 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

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 ...
3
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
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 ...
19
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
705 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
656 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 ...
28
votes
4answers
17k 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
5k 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
2k 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
982 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
1k views

PostGIS 3D in Action

I was wondering if there is a website that showcases Openlayers and PostGIS 3D in Action
22
votes
3answers
18k 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
876 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
862 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) ...
15
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
3k 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 ...
5
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
10k 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
2k 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) ?