Ecotrust / bioregion-discovery

Ecotrust's Bioregion Discovery Portal
http://bioregions.apps.ecotrust.org
4 stars 1 forks source link

bad KML geometry when bioregion crosses the equator #1

Closed perrygeo closed 12 years ago

perrygeo commented 12 years ago

What steps will reproduce the problem?

  1. Create a bioregion which crosses the equator

What is the expected output? What do you see instead? The polygon should be continuous ... instead it takes on a funky self-intersecting shape where the latitude approaches zero. The points suddenly shift to 100+ latitude (which is impossible but GE insists on rendering it at the north pole).

Consider this sequence of points in the attached kml...

-50.91691675,-0.228470884369,100 -50.9178974721,100.507154349384,100

Huh? I've tried to use ogr2ogr to replicate the issue but that appears to work OK. Not sure if the problem is in postgis or proj or geodjango but it needs a fixin'.

Google Code Info: Issue #: 1 Author: perrygeo...@gmail.com Created On: 2011-06-10T13:09:40.000Z Closed On: 2011-06-16T17:21:45.000Z

perrygeo commented 12 years ago

That was just stupid - the as_kml utility function was replacing ,0 with ,100 (or whatever the extrude height setting was) .. changed lingcod.common.utils to only replace ",0 " (trailing space) to make sure z value is affected but not latitudes at the equator!

Google Code Info: Author: perrygeo...@gmail.com Created On: 2011-06-16T17:21:45.000Z