52North / IlwisCore

Integrated Land and Water Information System (ILWIS) is a remote sensing and GIS software. ILWIS Core is the functional center of ilwis4..
http://52north.org/communities/ilwis/
35 stars 13 forks source link

WGS & Geometry::transform(targetCsy) #26

Closed pokulo closed 10 years ago

pokulo commented 10 years ago

How can we transform Coordinates given in WGS84 into other CoordinateSystem?

if we use simply

g = Geometry("POINT(6.5 52.1)", CoordinateSystem("code=proj4:+proj=longlat +ellps=WGS84 +datum=WGS84"))
g1 = g.transform(CoordinateSystem("code=epsg:3329"))
self.assertEqual("POINT(4.94595e+006 5.81942e+006)", g1.toWKT())

the coordinates are passed through to LatLon ProjectionImplementationProj4::coord2latlon(const Coordinate &crd) and go unmodified into pj_transform() which should only take radians but no degrees.

What is goin wrong?

pokulo commented 10 years ago

can we always assume _pjBase != 0 here? Code like this

gk2 = CoordinateSystem("code=epsg:31466")   # DHDN / 3-degree Gauss-Kruger zone 2
g1 = g.transform(gk2)

causes

ILWIS Error: (di feb 11 17:49:36 2014) projection error:major axis or radius = 0 or not given
pokulo commented 10 years ago

solved here e687f18