Re: MySQL GIS
- From: pramsey@xxxxxxxxxxxxxxx
- Date: 31 Aug 2005 19:41:12 -0700
Distance on the spheroid is already done in PostGIS, see:
http://postgis.refractions.net/docs/ch06.html#id2515612
and distance_spheroid.
Area on the spheroid, buffers, and other computations, are not done, as
they make distance calculations look pleasant by comparison.
P.
Paul Cooper wrote:
> On 27 Aug 2005 15:36:50 -0700, "www.douglassdavis.com"
> <doug@xxxxxxxxxxxxxxxxx> wrote:
>
> >
> >colinr23@xxxxxxxxx wrote:
> >> as long as all your data is stored in the same units, distance
> >> calculations should be correct. If you have datasets in different
> >> projections, you'll have to convert them prior to doin calculations,
> >> maybe with a custom written function. The actual nuts and bolts for
> >> the calculations should be easy enough to find. I'd convert all my
> >> data in arc then load it into mysql once its all in the same projection.
> >
> >I don't know too much about projections actually...
> >
> >I'm guessing putting the data in the same projection guarantees that
> >each unit will be equidistant, so that the distance measurements will
> >work properly on a plane. Is that right?
> >
> >One more thing, if that is true, then I'm guessing a projection can't
> >work, for example, for the whole world, they would have to be confined
> >to a limited space. Otherwise, how would the units be equidistant?
> >
> >Maybe I'm being naive about this, but can PostGIS make proper distance
> >calculations w/just lat/lon? Or does it have to be using some other
> >projection?
>
>
> Projections may have have one of two major properties - they may
> preserve area, or they may preserve shape, or neither. The former is
> called an equal area projection, the latter is called a conformal
> projection. Incidentally, although I loosely said "preserves shape"
> this is in fact a local property, and shape is not necessarily
> preserved over long distances - the actual property conserved is that
> scale is the same in all directions at every point on the projected
> plane. As scale does vary from place to place, the cpnservation of
> shape is only local. These two properties are mutually exclusive -
> this is provable mathematically, and arises from the differing
> topologies of a sphere and a plane. NO projection can preserve
> distance, with only two exceptions - and these only preserve distance
> either from one point or from two points, not from any point to any
> other point.
>
> Unfortunately, although correct computations using latitude and
> longitudes are perfectly feasible - see the geod program that is
> packaged with proj - the naive cosine rule equations are not a good
> choice for a general purpose algorithm, as they suffer from numerical
> instabilities in certain cases. So, there is no "good" choice for a
> single algorithm for computing distance from latitude and longitude
> coordinates. Programs such as geod use different algorithms for
> different cases. The ellipticity of the earth is another confounding
> factor - the length of a degree of latitude increases towards the
> poles, for example. So, realistically, the best hope of doing this
> with PostGIS would be to create a connection to geod - this may
> already be done, but if not, perhaps this would be a useful project
> for someone with time on their hands?
>
> Paul
.
- Follow-Ups:
- Re: MySQL GIS
- From: Paul Cooper
- Re: MySQL GIS
- Next by Date: Re: TAB and TFW
- Next by thread: Re: MySQL GIS
- Index(es):
Relevant Pages
|
Loading