A layer with no Native Projection

Osei
Osei Global Mapper UserTrusted User
edited October 2009 in SDK
There are times when I want to know if a certain layer has no native projection. Prior to GM-SDK1.32, we got projection and checked if ProjSys = 0 (Geo[Long/Lat), Datum = 0 (ADINDAN), UNIT = 0 (RADIANS) and NumAttrs = 0. This worked for a while till we recently upgraded to GM1.32. Now we query and the projection returns with one Attribute set (Central Longitude = 0) so now our test for a Null projection is failing.

In a bid to fix this, have tried using GM_PRJ_UNKNOWN (-1), GM_DATUM_UNKNOWN(-1), GM_PRJ_UNIT_UNKNOWN(-1) and this fails completely.

I would like to know, how can I confidently set a layer's projection to a Null projection (or a projection which represents Null), and query and get the same projection back so that I know that this layer's projection has intentionally been set to NULL. Or is there a way for me to determine, from the GM_LayerInfo_t whether the layer does not have any native projection set??

Is a Projection with ProjSys = Geo(Long/Lat), Datum = Adindan and Unit = Radians ever possible?? If not, then I can still go ahead and define that as my null projection.

Thanks

Comments

  • global_mapper
    global_mapper Administrator
    edited October 2009
    Osei,

    You can use the same NULL check as before and just ignore the new attribute for GM_PRJ_GEO projections. While the projection that you are using is technically possible, I have never seen a Geographic projection in the wild using radians as units, let alone radians and the Adindan datum. If you want to be really safe you could use one of the interplanetary datums.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com