func (d *SRTM) AddElevations(geoJson *geojson.Geometry, skipErrors bool) error {
	switch geoJson.Type {
	case geojson.GeometryPoint:
		point, err := d.AddElevation(geoJson.Point)
		if err != nil && !skipErrors {
			return err
		}
		geoJson.Point = point
		return nil
	case geojson.GeometryLineString:
		d.process2(geoJson.LineString, runtime.NumCPU())
		return nil
	case geojson.GeometryMultiPoint:
		d.process2(geoJson.MultiPoint, runtime.NumCPU())
		return nil
	case geojson.GeometryPolygon:
		d.process3(geoJson.Polygon, runtime.NumCPU())
		return nil
	case geojson.GeometryMultiLineString:
		d.process3(geoJson.MultiLineString, runtime.NumCPU())
		return nil
	default:
		return nil
	}
}
// AddElevations returns geojson with added third coordinate (elevation)
// Param tileDir - directory of hgt-tiles
// Param geoJson - geojson for processing
// Param skipErrors - if false AddElevations use premature exit (on first bad point in geojson). if true all points will be process but bad point will not to be contains elevation coordinate
AddElevations returns geojson with added third coordinate (elevation)
Param tileDir - directory of hgt-tiles
Param geoJson - geojson for processing
Param skipErrors - if false AddElevations use premature exit (on first bad point in geojson). if true all points will be process but bad point will not to be contains elevation coordinate
// AddElevations returns geojson with added third coordinate ( elevation ) // Param tileDir - directory of hgt - tiles // Param geoJson - geojson for processing // Param skipErrors - if false AddElevations use premature exit ( on first bad point in geojson ) . if true all points will be process but bad point will not to be contains elevation coordinate
func (d *SRTM) AddElevations(geoJson *geojson.Geometry, skipErrors bool) error {
	switch geoJson.Type {
	case geojson.GeometryPoint:
		point, err := d.AddElevation(geoJson.Point)
		if err != nil && !skipErrors {
			return err
		}
		geoJson.Point = point
		return nil
	case geojson.GeometryLineString:
		d.process2(geoJson.LineString, runtime.NumCPU())
		return nil
	case geojson.GeometryMultiPoint:
		d.process2(geoJson.MultiPoint, runtime.NumCPU())
		return nil
	case geojson.GeometryPolygon:
		d.process3(geoJson.Polygon, runtime.NumCPU())
		return nil
	case geojson.GeometryMultiLineString:
		d.process3(geoJson.MultiLineString, runtime.NumCPU())
		return nil
	default:
		return nil
	}
}
func ( d * SRTM ) AddElevations ( geoJson * geojson . Geometry , skipErrors bool ) error { switch geoJson . Type { case geojson . GeometryPoint : point , err := d . AddElevation ( geoJson . Point ) if err != nil && ! skipErrors { return err } geoJson . Point = point return nil case geojson . GeometryLineString : d . process2 ( geoJson . LineString , runtime . NumCPU ( ) ) return nil case geojson . GeometryMultiPoint : d . process2 ( geoJson . MultiPoint , runtime . NumCPU ( ) ) return nil case geojson . GeometryPolygon : d . process3 ( geoJson . Polygon , runtime . NumCPU ( ) ) return nil case geojson . GeometryMultiLineString : d . process3 ( geoJson . MultiLineString , runtime . NumCPU ( ) ) return nil default : return nil } }
AddElevations returns geojson with added third coordinate (elevation)
Param tileDir - directory of hgt-tiles
Param geoJson - geojson for processing
Param skipErrors - if false AddElevations use premature exit (on first bad point in geojson).
AddElevations returns geojson with added third coordinate ( elevation ) Param tileDir - directory of hgt - tiles Param geoJson - geojson for processing Param skipErrors - if false AddElevations use premature exit ( on first bad point in geojson ) .