shape

package
v0.0.0-...-f45db20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromLonLat

func FromLonLat(code int, lon, lat float64) (float64, float64, error)

FromLonLat converts a longitude and latitude to a set of coordinates in the specified EPSG code.

func Overlaps

func Overlaps(b1, b2 *shp.Box) bool

Overlaps indicates whether two bounding boxes overlap.

func PolylineToLineString

func PolylineToLineString(polyline *shp.PolyLine, code int) (*orb.LineString, error)

PolylineToLineString converts a Shapefile polyline to a LineString. This will also perform reprojection from the specified EPSG code to WGS84.

func ReprojectBoxFromWGS84

func ReprojectBoxFromWGS84(box *shp.Box, code int) (*shp.Box, error)

ReprojectBoxFromWGS84 reprojects the coordinates of a bounding box from WGS84 to a specified EPSG code.

func ToLonLat

func ToLonLat(code int, x, y float64) (float64, float64, error)

ToLonLat converts a coordinate projected in the specified EPSG code to a longitude and latitude.

Types

type Reader

type Reader struct {
	*shp.Reader
}

Reader wraps the shp.Reader struct and provides additional convenience methods.

func NewFromFile

func NewFromFile(path string) (*Reader, *dbf.Table, error)

NewFromFile simultaneously initialises a new Reader and dbf.Table from the given path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL