Re: MySQL GIS
- From: Paul Cooper <paul.cooper@xxxxxxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 08:29:52 +0100
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
.
- References:
- MySQL GIS
- From: www.douglassdavis.com
- Re: MySQL GIS
- From: colinr23
- Re: MySQL GIS
- From: www.douglassdavis.com
- MySQL GIS
- Prev by Date: Re: ADV: GeoTools 6.10, Complete productivity for the AutoCAD GIS user
- Previous by thread: Re: MySQL GIS
- Next by thread: Problem with MAPSERVER-ECW files on LINUX
- Index(es):
Relevant Pages
|