Example #1
0
File: osr.go Project: 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
}
Example #2
0
File: osr.go Project: 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
}