Beispiel #1
0
Datei: osr.go Projekt: 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
}
Beispiel #2
0
Datei: osr.go Projekt: 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
}
Beispiel #3
0
// 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()
}
Beispiel #4
0
// 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()
}