Re: MySQL GIS



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
.



Relevant Pages

  • Re: MySQL GIS
    ... > projections, you'll have to convert them prior to doin calculations, ... > data in arc then load it into mysql once its all in the same projection. ... so that the distance measurements will ... how would the units be equidistant? ...
    (comp.infosystems.gis)
  • Re: MySQL GIS
    ... Distance on the spheroid is already done in PostGIS, ... they make distance calculations look pleasant by comparison. ... >>> data in arc then load it into mysql once its all in the same projection. ... > preserve area, or they may preserve shape, or neither. ...
    (comp.infosystems.gis)
  • Re: Poisson Distribution
    ... The distance between the edge of the circle and the Neandertal is 20 ... You are repeating your unsupported assumption that the closest human to a Neandertal is one on the "edge of the circle". ... Projection from a higher to a lower dimensional space does not - except in rare instances - conserve relative distances. ... For example if you look at the sky Alnitak, Alnilam and Mintaka appear to lie between Sirius and Aldebaran. ...
    (talk.origins)
  • Re: Latitude / longitude distance and bearing.
    ... distance along the circumference of the earth, which I can get from the ... Latitude and longitude are often projected to plane rectangular coordinate ... South then often a Transverse Mercator projection is used. ...
    (sci.math)
  • Re: Projection plane
    ... average distance of an computer user to the screen... ... how can I squeeze out the distance of the projection plane ...
    (comp.graphics.api.opengl)