Skip to content

remove EPSG 4326 to allow for planetary bounds (untested) #175

@thareUSGS

Description

@thareUSGS

To fix the calculation for planetary codes in the latest version, this code can likely be updated
from:

    srs = get_ref(layer)
    srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
    target = osr.SpatialReference()
    target.ImportFromEPSG(4326)
    target.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)

https://github.com/DOI-USGS/fort-pymdwizard/blob/225193692f9399b20d44905d7cf8e58441e428bd/pymdwizard/core/spatial_utils.py#L142C1-L143C32

to:

    srs = get_ref(layer)
    srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
    # Get the body (planet or moon, Earth is a planet too ;-) from the projection definition
    # removes the lock-in to EPSG:4326 (WGS84)
    target = srs.CloneGeogCS()
    target.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions