Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and add sanity check for coordinate handling from CSW #917

Merged
merged 4 commits into from
Jan 30, 2023

Conversation

ZakarFin
Copy link
Member

@ZakarFin ZakarFin commented Jan 30, 2023

So we don't get OutOfMemoryError for very large numbers and we don't need to catch exceptions for missing values.

For example:

Missing values:

    <gmd:geographicElement>
        <gmd:EX_GeographicBoundingBox>
            <gmd:westBoundLongitude>
                <gco:Decimal />
            </gmd:westBoundLongitude>
            <gmd:eastBoundLongitude>
                <gco:Decimal />
            </gmd:eastBoundLongitude>
            <gmd:southBoundLatitude>
                <gco:Decimal />
            </gmd:southBoundLatitude>
            <gmd:northBoundLatitude>
                <gco:Decimal />
            </gmd:northBoundLatitude>
        </gmd:EX_GeographicBoundingBox>
    </gmd:geographicElement>

These will make interpolated WKT throw OutOfMemoryError:

     <gmd:geographicElement>
         <gmd:EX_GeographicBoundingBox>
             <gmd:westBoundLongitude>
                <gco:Decimal>-340282346638529000000000000000000000000</gco:Decimal>
             </gmd:westBoundLongitude>
             <gmd:eastBoundLongitude>
                <gco:Decimal>340282346638529000000000000000000000000</gco:Decimal>
             </gmd:eastBoundLongitude>
             <gmd:southBoundLatitude>
                <gco:Decimal>-340282346638529000000000000000000000000</gco:Decimal>
             </gmd:southBoundLatitude>
             <gmd:northBoundLatitude>
                <gco:Decimal>340282346638529000000000000000000000000</gco:Decimal>
             </gmd:northBoundLatitude>
         </gmd:EX_GeographicBoundingBox>
     </gmd:geographicElement>

@ZakarFin ZakarFin added this to the 2.10.0 milestone Jan 30, 2023
@ZakarFin ZakarFin merged commit 2ddfc0a into oskariorg:develop Jan 30, 2023
@ZakarFin ZakarFin deleted the metadata-wkt branch January 30, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant