[OSM-dev] OSM data import using osm2pgsql... what's next.
Paul Norman
penorman at mac.com
Sat Aug 2 20:46:48 UTC 2014
On 8/2/2014 1:52 AM, Christian Quest wrote:
> It is possible to do on the fly reprojection with postgis using
> ST_Transform... but this may cause a lot of calculations.
> It your queries use a lot of distance calculations, you'll want to do
> them with real "spherical" distances, and not the projected one that
> is not linear. In web mercator the "distance" are pixel based, and not
> linear. The same "distance" will be much small at the equator compared
> to iceland or south africa...
The difference between a spherical distance and a spheroid distance is
really only significant for large distances.
There are a few ways to handle distance calculations, depending on your
needs
- If dealing with a small area, use a suitable projection like UTM or a
state plane for the entire database
- Use ST_Distance_Sphere or ST_Distance_Spheroid. If doing this,
consider importing in EPSG:4326
- Convert geographies to geometries
- Make use of the fact that Mercator is conformal and web Mercator is
approximately conformal. This means that local to a point, the distance
in mercator is a scalar multiplier of the true distance
More information about the dev
mailing list