Esempio n. 1
0
File: osr.go Progetto: kikht/gdal
// Export coordinate system to WKT
func (sr SpatialReference) ToWKT() (string, error) {
	var p *C.char
	err := C.OSRExportToWkt(sr.cval, &p)
	if err != 0 {
		return "", error(err)
	}

	wkt := C.GoString(p)
	return wkt, nil
}
Esempio n. 2
0
File: osr.go Progetto: sn-amber/gdal
// Export coordinate system to WKT
func (sr SpatialReference) ToWKT() (string, error) {
	var p *C.char
	err := C.OSRExportToWkt(sr.cval, &p).Err()
	wkt := C.GoString(p)
	return wkt, err
}