Closed akorosov closed 10 years ago
Added class NSR(osr.SpatialReference) which overrides the constructor. Now parameter to the constructor can be proj4 string, WKT string, EPSG code, or another osr.SpatialReference() (and hence NSR) object.
Default values of NSR() is wgs84 latlong.
This is used almost everywhere where projection is giben as a parameter (e.g. Domain.init). However interface of the public functions is not changed, (so we still can provide proj4 string to Domain) rather these inputs are parsed within NSR.init()
nansat_tools.latlongSRS is removed and NSR() is used instead.
Closed in c72dd9e
Problem
If we provide proj4 or WKT strings as input to domain and other functions that require spatial reference we have to parse these strings and create osr.SpatialReference and then convert it ot WKT or proj4.
Solution
Provide only osr.SpatialReference as input to Domain or other functions where spatial reference is needed.
Comments
class SRS(osr.SpatialReference)
and override constructor to take not only WKT but also proj4 string or epsg code.