[MetaCRS] [Proj4js] geocent proj issue.

Richard Greenwood richard.greenwood at gmail.com
Sat Sep 11 13:25:14 EDT 2010


I had planned to add support for grid-based datum transformations to
cscs. ("cscs" is the name that I had originally given to what is NKA
proj4js)

I was thinking of transferring only that part of the grid required by
the map's bounds, as Paul suggests, but also re-sampled to an
appropriate resolution. (lower resolution for smaller scales, higher
resolution for larger scales)

The bounds and resolution could either be specified before hand, or an
a "automatic" mode could be employed that would watch pan and zoom
events for significant changes in bounds and/or pixel size. Again,
pretty similar to Paul's WCS suggestion.

But taking that idea a little further, you could probably just request
a single transformation for the center pixel of a given image request.
For a simple web mapping app, I doubt that you would ever need more
than that. e.g. the furthest corners of the image would probably never
be "off" more than the image's pixel size. (I haven't done the math,
but I'd bet an Estrella on it). The transform could be done entirely
on the server, but you would need to watch pan and zoom events, maybe
applying a little "slop" factor so that you didn't request new
transforms for minor pans/zooms.

Regards,
Rich




On Fri, Sep 10, 2010 at 1:35 PM, Paul Ramsey <pramsey at opengeo.org> wrote:
> You know what would be cool? Downloading the part of the grid you need
> from a WCS (and by "cool" I mean, "unbearably doctrinaire from a
> standards point-of-view")
>
> P
>
> On Fri, Sep 10, 2010 at 8:02 PM, Mike Adair <madair at dmsolutions.ca> wrote:
>> Hi Clement,
>>
>> There aren't any plans to support grid shift files currently.  The main
>> issue is downloading some potentially large files to the client.
>>
>> Mike
>>
>>
>> On 9/10/2010 3:29 AM, Clément Ronzon wrote:
>>
>> Hi Mike,
>>
>> I'm going to check the PROJ.4 files to reproduce the geocent behavior you
>> described.
>> I'll keep you in touch.
>>
>> I've another question about "nadgrids" this time: do you know if Proj4js
>> could be able to handle nadgrids files ? May be using Ajax requests...
>>
>> Thanks for your help!
>> Sincerely,
>> Clément Ronzon
>> 151 Av. Félix Faure
>> 69003 LYON, FRANCE
>> Tel. # : +33 (0)9 54 43 12 20
>> Fax # : +33 (0)9 59 43 12 20
>> Cell. # : +33 (0)6 08 21 23 27
>> http://twcc.free.fr
>> http://www.grottocenter.org
>> http://www.zakbag.com
>>
>>
>> On Thu, Sep 9, 2010 at 8:51 PM, Mike Adair <madair at dmsolutions.ca> wrote:
>>>
>>> Hi Clement,
>>>
>>> The contents of the old geocent.js file is now contained in the main
>>> proj4js.js file and it mainly handled conversions to/from
>>> geocentric/geodetic coordinates.
>>>
>>> I assume you are trying to convert from geocentric to Lat/long coords?  I
>>> see that PROJ.4 handles that case where the geocent 'projection' is defined
>>> with the identity transform (like you have done) but i don't think that will
>>> work in Proj4js.  You may be able to step through a transformation and see
>>> where the geocentric - geodetic transform occurs and where any errors may be
>>> introduced.
>>>
>>> Mike
>>>
>>>
>>>
>>> On 9/8/2010 6:54 AM, Clément Ronzon wrote:
>>>
>>> Hi everyone!
>>>
>>> I'm new on this mailing list, so I'll introduce myself in a few words: my
>>> name is Clément Ronzon, I'm living in France but I'm going to move to Mexico
>>> in a few months, I'm working in Informatics design and development for
>>> France Telecom, and I'm the developer of TWCC (http://twcc.free.fr).
>>>
>>> I have a question about geocent projections.
>>> I have the following definition :
>>> Proj4js.defs["IGNF:AMST63"] = "+title=Ile d'Amsterdam 1963 +proj=geocent
>>> +towgs84=109.7530,-528.1330,-362.2440 +a=6378388.0000 +rf=297.0000000000000
>>> +units=m +no_defs";
>>>
>>> But when proj4js tries to load the geocent proj file it fails because
>>> there is no geocent.js file. Actually I found that this file has been
>>> removed (http://trac.osgeo.org/proj4js/ticket/16).
>>>
>>> So I tried to create /lib/projCode/geocent.js with this content:
>>> Proj4js.Proj.geocent = {
>>>     GEOCENT_LAT_ERROR:0x0001,
>>>   init: function() {
>>>     //no-op
>>>   },
>>>   forward: function(pt) {
>>>     //identity transform
>>>     return pt;
>>>   },
>>>   inverse: function(pt) {
>>>     //identity transform
>>>     return pt;
>>>   }
>>> };
>>>
>>> But it seems that the result of transformations is wrong (some meters on X
>>> and Y).
>>> Could someone tell me how can I solve this issue please ?
>>>
>>> Thanks in advance! And, by the way, congratulations for those metaCRS
>>> projects!!!
>>> Clément Ronzon
>>> 151 Av. Félix Faure
>>> 69003 LYON, FRANCE
>>> Tel. # : +33 (0)9 54 43 12 20
>>> Fax # : +33 (0)9 59 43 12 20
>>> Cell. # : +33 (0)6 08 21 23 27
>>> http://twcc.free.fr
>>> http://www.grottocenter.org
>>> http://www.zakbag.com
>>>
>>> _______________________________________________
>>> MetaCRS mailing list
>>> MetaCRS at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/metacrs
>>>
>>> --
>>>    Michael Adair
>>>    Senior Software Architect
>>>    DM Solutions Group Inc.
>>>
>>>    Office: (613) 565-5056 x26
>>>    madair at dmsolutions.ca
>>>    http://www.dmsolutions.ca
>>>    http://research.dmsolutions.ca
>>>
>>>
>>> _______________________________________________
>>> MetaCRS mailing list
>>> MetaCRS at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/metacrs
>>>
>>
>>
>> _______________________________________________
>> MetaCRS mailing list
>> MetaCRS at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/metacrs
>>
>> --
>>    Michael Adair
>>    Senior Software Architect
>>    DM Solutions Group Inc.
>>
>>    Office: (613) 565-5056 x26
>>    madair at dmsolutions.ca
>>    http://www.dmsolutions.ca
>>    http://research.dmsolutions.ca
>>
>>
>> _______________________________________________
>> MetaCRS mailing list
>> MetaCRS at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/metacrs
>>
>>
> _______________________________________________
> MetaCRS mailing list
> MetaCRS at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/metacrs
>



-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com


More information about the MetaCRS mailing list