[MetaCRS] csmap - distance calculation
Norman Barker
norman.barker at gmail.com
Tue Apr 2 09:53:19 PDT 2013
Hi Andre,
thank you, I was able to get this working
https://twitter.com/normanbarker/status/317451489121546240/photo/1.
Cloudant have also open sourced the erlang bindings for CsMap, Geos and
libspatialindex. http://www.github.com/cloudant.
I will be making this more complete over the course of the year and adding
examples.
thanks,
Norman
On Thu, Mar 21, 2013 at 2:57 PM, Andre Barth <Andre.Barth at autodesk.com>wrote:
> Hi Norman,
>
> What you're looking for should be possible – even though I'm not quite
> clear about what you mean by "*… Add metres to it…*"
>
> What's the source & target EPSG ID, btw? CS-Map doesn't support all EPSG
> coordinate reference systems, but a good amount of it.
>
> But let me test my understanding here:
>
> For a given EPSG 'coordinate reference system' (assuming CS-Map has
> support for it), you need to convert/transform a point to a different
> 'coordinate reference system', which, in your case, happens to be a
> projected system which uses a spherical projection (which?) ?
>
> This you can do using the CS_cnvrt function (in forward and inverse
> direction).
>
> double xyz [3];
>
>
> xyz [0] = 0.0;
>
> xyz [1] = 20000000.000;
>
> xyz [2] = 0.0;
>
>
> int st = CS_cnvrt ("WGS84.PseudoMercator","LL",xyz);
>
> Note though, that this requires you to supply CS-Map (string) IDs – not
> EPSG Ids
>
> CSepsg2adskCS() does the mapping.
>
>
> BTW – are you just interested in calculating a point which does have an
> offset to the given original point?
>
> If so, you might want to look into
>
> CS_azddll
>
> which calculates a LL (long lat) target point from a source LL
> coordinate pair, azimuth & distance (i.e. meter). The LL point for your
> projected coordinates (and vice versa) you can retrieve using the CS_cs2ll
> and CS_ll2cs functions, respectively.
>
> HTH,
> Andre
>
>
> On 3/20/13 10:36 PM, "Norman Barker" <norman.barker at gmail.com> wrote:
>
> Hi,
>
> I am using csmap for the first time and I have been able to get it
> compiled on mac. I am interested in how I take a point in a particular
> projection (for now defined by an epsg code) and convert this to a
> spherical projection and add metres to it and then reverse this
> transform. I am trying to do the same as the PostGIS Geographic type
> but using CsMap to do a radius search, I will then use geos to buffer
> the original centre point by the distance (in the original
> coordinates).
>
> Is this possible?
>
> thanks,
>
> Norman
> _______________________________________________
> MetaCRS mailing list
> MetaCRS at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/metacrs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/metacrs/attachments/20130402/9ff7a9ba/attachment.html>
More information about the MetaCRS
mailing list