Thread: PostGIS
Can anyone point me to an overview of PostGIS and how it is being used???
Bob Pawley
Here is their web page:
I am probably not the best to answer how it is used because we use it just to allow index on spatial data (coordinates). You may ask on the postgis mailing list.
Woody
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Bob Pawley
Sent: Thursday, October 19, 2006 11:09 AM
To: Postgresql
Subject: [GENERAL] PostGIS
Can anyone point me to an overview of PostGIS and how it is being used???
Bob Pawley
On Oct 19, 2006, at 11:08 AM, Bob Pawley wrote:
Can anyone point me to an overview of PostGIS and how it is being used???
Bob,
PostGIS provides extensions to PostgreSQL's procedural language and geometric data types so that it can store geo-referenced data, and so that you can query this data using geo-spatial coordinates.
Software like MapServer (web) and Qgis (desktop) use PostGIS to provide data in map applications.
The Refractions site already noted is a good start. The MapServer site is another:
Jim
-----
James Cradock, jcradock@me3.com
I use postgis to wipe my ASS ...
no good documentation ...
in what units is the result of distance(geometry,geometry)..
what is distance_sphere(geometry,geometry).. when u give same geometry as both parameters it gives a non-zero value ....
On 10/19/06, James Cradock <jcradock@me3.com> wrote:
On Oct 19, 2006, at 11:08 AM, Bob Pawley wrote:Can anyone point me to an overview of PostGIS and how it is being used???Bob,PostGIS provides extensions to PostgreSQL's procedural language and geometric data types so that it can store geo-referenced data, and so that you can query this data using geo-spatial coordinates.Software like MapServer (web) and Qgis (desktop) use PostGIS to provide data in map applications.The Refractions site already noted is a good start. The MapServer site is another:Jim-----
James Cradock, jcradock@me3.com
--
Sandeep Kumar Jakkaraju
WeBlog:
http://jakkarajus.blogspot.com
Thanks Jim
Bob
----- Original Message -----From: James CradockTo: PostgresqlCc: Bob PawleySent: Thursday, October 19, 2006 8:35 AMSubject: Re: [GENERAL] PostGISOn Oct 19, 2006, at 11:08 AM, Bob Pawley wrote:Can anyone point me to an overview of PostGIS and how it is being used???Bob,PostGIS provides extensions to PostgreSQL's procedural language and geometric data types so that it can store geo-referenced data, and so that you can query this data using geo-spatial coordinates.Software like MapServer (web) and Qgis (desktop) use PostGIS to provide data in map applications.The Refractions site already noted is a good start. The MapServer site is another:Jim-----
James Cradock, jcradock@me3.com
Thanks Woody
Bob
----- Original Message -----From: Woody WoodringTo: 'Bob Pawley' ; 'Postgresql'Sent: Thursday, October 19, 2006 8:18 AMSubject: Re: [GENERAL] PostGISHere is their web page:I am probably not the best to answer how it is used because we use it just to allow index on spatial data (coordinates). You may ask on the postgis mailing list.Woody
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Bob Pawley
Sent: Thursday, October 19, 2006 11:09 AM
To: Postgresql
Subject: [GENERAL] PostGISCan anyone point me to an overview of PostGIS and how it is being used???Bob Pawley
On Thu, Oct 19, 2006 at 09:31:40PM +0530, Sandeep Kumar Jakkaraju wrote: > I use postgis to wipe my ASS ... > no good documentation ... If you find the documentation lacking then please consider posting to postgis-users with suggestions for improving it. Even better, submit a patch :-) > in what units is the result of distance(geometry,geometry).. http://postgis.refractions.net/docs/ch06.html#id2526205 "Return the cartesian distance between two geometries in projected units." If the geometries are in degrees then distance() returns degrees; if they're in meters then distance() returns meters; if they're in cubits then distance() returns cubits. > what is distance_sphere(geometry,geometry).. http://postgis.refractions.net/docs/ch06.html#id2528534 "Returns linear distance in meters between two lat/lon points." > when u give same geometry as both parameters it gives a non-zero > value .... test=> SELECT distance(GeomFromText('POINT(12 34)'), GeomFromText('POINT(12 34)')); distance ---------- 0 (1 row) test=> SELECT distance_sphere(GeomFromText('POINT(12 34)'), GeomFromText('POINT(12 34)')); distance_sphere ----------------- 0 (1 row) If you're getting unexpected behavior then please post a test case to postgis-users. -- Michael Fuhr
Sandeep Kumar Jakkaraju wrote: > > I use postgis to wipe my ASS ... > no good documentation ... The docs are a bit technical, but the product is excellent, I use it to manage a variety of spatial datasets, with up to hundreds of millions of features, on half a dozen systems. I'd highly recommend it, & would also say that the online support from the developers and users is of a very high standard. Note that you should have some sort of understanding of projections before you start doing things like measuring or reprojecting, to understand the issues involved, but these are not just a Postgis issue. In answer to the original question (I'd have replied earlier but just got back from 2 weeks at sea - using Postgis amongst other things) If you look at the case studies Paul Ramsey is accumulating at http://postgis.refractions.net/news/ it might help. > in what units is the result of distance(geometry,geometry) As in the docs, the distance is returned in the units specified in the projection definition of your geometries. > what is distance_sphere(geometry,geometry).. when u give same geometry > as both parameters it gives a non-zero value .... Hmm. just tried this. Within floating point rounding errors, this seems to contradict this claim, unless you suggest a floating point non-zero represenation of zero is a postgis error. In which case I suggest CompSci 101 might be educational. corax=# select distance_sphere(the_geom,the_geom) from bivouac_pnt limit 10; distance_sphere ---------------------- 0 0 0 0 0 7.07321632848846e-10 7.07321632848846e-10 7.07321632848846e-10 0 7.07321632848846e-10 (10 rows) Cheers, Brent Wood > > On 10/19/06, *James Cradock* <jcradock@me3.com > <mailto:jcradock@me3.com>> wrote: > > On Oct 19, 2006, at 11:08 AM, Bob Pawley wrote: > >> Can anyone point me to an overview of PostGIS and how it is being >> used??? > > Bob, > > PostGIS provides extensions to PostgreSQL's procedural language > and geometric data types so that it can store geo-referenced data, > and so that you can query this data using geo-spatial coordinates. > > Software like MapServer (web) and Qgis (desktop) use PostGIS to > provide data in map applications. > > The Refractions site already noted is a good start. The MapServer > site is another: > > http://mapserver.gis.umn.edu/gallery > > Jim > > ----- > > James Cradock, jcradock@me3.com <mailto:jcradock@me3.com> > > > > > > -- > Sandeep Kumar Jakkaraju > WeBlog: > http://jakkarajus.blogspot.com
Hi All ..
Please forgive my ignorance ....
After all it is open source ...so how can one trust it fully ....
I am GIS guy (i think ..)
Like We have used the Haversine formula ...given on most of the websites ... to calculate the distance between to lat/lon points ..
which doesnt match with the distance given by distance_sphere() method ...!!!
How can I convice my boss .who doesnt know abt gis leave ..Postgis that Postgis is correct and not is Formula ...
Thanks
Sandeep
PS:- Actually i am a big fan of opensource GIS stuff ...
--
Sandeep Kumar Jakkaraju
WeBlog:
http://jakkarajus.blogspot.com
Please forgive my ignorance ....
After all it is open source ...so how can one trust it fully ....
I am GIS guy (i think ..)
Like We have used the Haversine formula ...given on most of the websites ... to calculate the distance between to lat/lon points ..
which doesnt match with the distance given by distance_sphere() method ...!!!
How can I convice my boss .who doesnt know abt gis leave ..Postgis that Postgis is correct and not is Formula ...
Thanks
Sandeep
PS:- Actually i am a big fan of opensource GIS stuff ...
On 10/31/06, Bent Wood <b.wood@niwa.co.nz > wrote:
Sandeep Kumar Jakkaraju wrote:
>
> I use postgis to wipe my ASS ...
> no good documentation ...
The docs are a bit technical, but the product is excellent, I use it to
manage a variety of spatial datasets, with up to hundreds of millions of
features, on half a dozen systems. I'd highly recommend it, & would also
say that the online support from the developers and users is of a very
high standard.
Note that you should have some sort of understanding of projections
before you start doing things like measuring or reprojecting, to
understand the issues involved, but these are not just a Postgis issue.
In answer to the original question (I'd have replied earlier but just
got back from 2 weeks at sea - using Postgis amongst other things)
If you look at the case studies Paul Ramsey is accumulating at
http://postgis.refractions.net/news/ it might help.
> in what units is the result of distance(geometry,geometry)
As in the docs, the distance is returned in the units specified in the
projection definition of your geometries.
> what is distance_sphere(geometry,geometry).. when u give same geometry
> as both parameters it gives a non-zero value ....
Hmm. just tried this. Within floating point rounding errors, this seems
to contradict this claim, unless you suggest a floating point non-zero
represenation of zero is a postgis error. In which case I suggest
CompSci 101 might be educational.
corax=# select distance_sphere(the_geom,the_geom) from bivouac_pnt limit 10;
distance_sphere
----------------------
0
0
0
0
0
7.07321632848846e-10
7.07321632848846e-10
7.07321632848846e-10
0
7.07321632848846e-10
(10 rows)
Cheers,
Brent Wood
>
> On 10/19/06, *James Cradock* <jcradock@me3.com
> <mailto:jcradock@me3.com>> wrote:
>
> On Oct 19, 2006, at 11:08 AM, Bob Pawley wrote:
>
>> Can anyone point me to an overview of PostGIS and how it is being
>> used???
>
> Bob,
>
> PostGIS provides extensions to PostgreSQL's procedural language
> and geometric data types so that it can store geo-referenced data,
> and so that you can query this data using geo-spatial coordinates.
>
> Software like MapServer (web) and Qgis (desktop) use PostGIS to
> provide data in map applications.
>
> The Refractions site already noted is a good start. The MapServer
> site is another:
>
> http://mapserver.gis.umn.edu/gallery
>
> Jim
>
> -----
>
> James Cradock, jcradock@me3.com <mailto: jcradock@me3.com>
>
>
>
>
>
> --
> Sandeep Kumar Jakkaraju
> WeBlog:
> http://jakkarajus.blogspot.com
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
--
Sandeep Kumar Jakkaraju
WeBlog:
http://jakkarajus.blogspot.com
On Nov 2, 2006, at 10:41 AM, Sandeep Kumar Jakkaraju wrote:
After all it is open source ...so how can one trust it fully ....
If you have a question about how something is working, and you find the end-user documentation to be lacking, you can look at the software's source.
-----
James Cradock, jcradock@me3.com
On Thu, Nov 02, 2006 at 09:11:58PM +0530, Sandeep Kumar Jakkaraju wrote: > Like We have used the Haversine formula ...given on most of the websites ... > to calculate the distance between to lat/lon points .. You can examine the PostGIS source code to see how distance_sphere() works; the underlying function is LWGEOM_distance_sphere() in lwgeom/lwgeom_spheroid.c. The algorithm appears to be Haversine. > which doesnt match with the distance given by distance_sphere() method Could you post an example showing how you're calling distance_sphere(), the output you get, and the output you get from other Haversine functions? Several possibilities might explain the discrepancy: 1. If the difference is small then distance_sphere() might be using a different value for the earth's radius than some other Haversine function. The earth isn't a perfect sphere so simple functions use approximations of the earth's radius and different functions might use different values. distance_sphere() uses 6370986.884258304, which is a reasonable (if overly precise) approximation of the earth's radius in meters. 2. Make sure you're comparing the same units. A Haversine function that returns distance in feet or miles won't return the same distance as distance_sphere(), which returns meters. 3. Make sure your PostGIS geometries have coordinates in the correct order: (X Y) which is (longitude latitude). This is a common cause of problems for people accustomed to thinking (latitude longitude) and who therefore create geometries as (Y X). -- Michael Fuhr