Beispiel #1
0
Datei: osr.go Projekt: kikht/gdal
// Export coordinate system in PROJ.4 format
func (sr SpatialReference) ToProj4() (string, error) {
	var p *C.char
	err := C.OSRExportToProj4(sr.cval, &p)
	if err != 0 {
		return "", error(err)
	}

	proj4 := C.GoString(p)
	return proj4, nil
}
Beispiel #2
0
// Export coordinate system in PROJ.4 format
func (sr SpatialReference) ToProj4() (string, error) {
	var p *C.char
	err := C.OSRExportToProj4(sr.cval, &p).Err()
	proj4 := C.GoString(p)
	return proj4, err
}