Example #1
0
File: osr.go Project: kikht/gdal
// Initialize SRS based on EPSG code
func (sr SpatialReference) FromEPSG(code int) error {
	err := C.OSRImportFromEPSG(sr.cval, C.int(code))
	if err != 0 {
		return error(err)
	}

	return nil
}
Example #2
0
File: osr.go Project: sn-amber/gdal
// Initialize SRS based on EPSG code
func (sr SpatialReference) FromEPSG(code int) error {
	return C.OSRImportFromEPSG(sr.cval, C.int(code)).Err()
}