Skip to content

Don't return values when doing inverse projections outside of the mollweide map#304

Merged
hobu merged 1 commit intoOSGeo:masterfrom
mraspaud:master
Sep 10, 2015
Merged

Don't return values when doing inverse projections outside of the mollweide map#304
hobu merged 1 commit intoOSGeo:masterfrom
mraspaud:master

Conversation

@mraspaud
Copy link
Contributor

@mraspaud mraspaud commented Sep 9, 2015

When doing invproj outside of the map with +proj=mollweide, valid lon/lat values were returned:
eg:

~$ invproj +proj=moll +a=6371000
-9000000 -9000000
113d0'27.032"W    89d27'43.361"S
^C
~$ proj +proj=moll +a=6371000
113d0'27.032"W    89d27'43.361"S
-0.00    -9009954.61

The effect of this can be seen here:
mollweide_bad

This patch fixes the behaviour by returning HUGE_VAL in the invproj call when outside the map.

…lweide map.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
@mraspaud
Copy link
Contributor Author

Here is how it looks now:

~$ invproj +proj=moll +a=6371000
-9000000 -9000000
-2147483648d-2147483648'-nan"E  -2147483648d-2147483648'-nan"N

mollweide_good

hobu added a commit that referenced this pull request Sep 10, 2015
Don't return values when doing inverse projections outside of the mollweide map
@hobu hobu merged commit 4bacfd1 into OSGeo:master Sep 10, 2015
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.

2 participants