示例#1
0
文件: osr.go 项目: kikht/gdal
// Set EPSG authority info if possible
func (sr SpatialReference) AutoIdentifyEPSG() error {
	err := C.OSRAutoIdentifyEPSG(sr.cval)
	if err != 0 {
		return error(err)
	}

	return nil
}
示例#2
0
文件: osr.go 项目: jskeates/go-gdal
// Set EPSG authority info if possible
func (sr SpatialReference) AutoIdentifyEPSG() error {
	errorCode := int(C.OSRAutoIdentifyEPSG(sr.cval))
	if errorCode != 0 {
		return fmt.Errorf("Error code %d", errorCode)
	} else {
		return nil
	}
}
示例#3
0
文件: osr.go 项目: sn-amber/gdal
// Set EPSG authority info if possible
func (sr SpatialReference) AutoIdentifyEPSG() error {
	return C.OSRAutoIdentifyEPSG(sr.cval).Err()
}