Example #1
0
File: osr.go Project: kikht/gdal
// Import coordinate system from a URL
func (sr SpatialReference) FromURL(url string) error {
	cURL := C.CString(url)
	defer C.free(unsafe.Pointer(cURL))
	err := C.OSRImportFromXML(sr.cval, cURL)
	if err != 0 {
		return error(err)
	}

	return nil
}
Example #2
0
File: osr.go Project: kikht/gdal
// Import coordinate system from XML format (GML only currently)
func (sr SpatialReference) FromXML(xml string) error {
	cXml := C.CString(xml)
	defer C.free(unsafe.Pointer(cXml))
	err := C.OSRImportFromXML(sr.cval, cXml)
	if err != 0 {
		return error(err)
	}

	return nil
}
Example #3
0
File: osr.go Project: sn-amber/gdal
// Import coordinate system from a URL
func (sr SpatialReference) FromURL(url string) error {
	cURL := C.CString(url)
	defer C.free(unsafe.Pointer(cURL))
	return C.OSRImportFromXML(sr.cval, cURL).Err()
}
Example #4
0
File: osr.go Project: sn-amber/gdal
// Import coordinate system from XML format (GML only currently)
func (sr SpatialReference) FromXML(xml string) error {
	cXml := C.CString(xml)
	defer C.free(unsafe.Pointer(cXml))
	return C.OSRImportFromXML(sr.cval, cXml).Err()
}