Shapefile

Documentation for Shapefile.

Shapefile.HandleType
Handle

Handle(path::AbstractString, [indexpath::AbstractString])

Load a shapefile into GeoInterface compatible objects. This can be plotted with Plots.jl plot.

The Vector of shape object can be accessed with shapes(handle).

Handle may have a known bounding box, which can be retrieved with GeoInterface.bbox.

source
Shapefile.MultiPatchType
MultiPatch

Stores a collection of patch representing the boundary of a 3d object.

Fields

  • MBR: nothing or the known bounding box. Can be retrieved with GeoInterface.bbox.
  • parts: a Vector of Int32 indicating the object each point belongs to.
  • parttypes: a Vector of Int32 indicating the type of object each point belongs to.
  • points: a Vector of Point represents a one or multiple spatial objects.
  • zrange: and Interval of bounds for the zvalues.
  • zvalues: a Vector of Float64 indicating absolute or relative heights.
source
Shapefile.MultiPointType
MultiPoint <: AbstractMultiPoint

Collection of points, from a shape file.

Fields

  • points: a Vector of Point.
  • MBR: nothing or the known bounding box. Can be retrieved with GeoInterface.bbox.
source
Shapefile.MultiPointMType
MultiPointM <: AbstractMultiPoint

Collection of points, from a shape file.

Includes a measures field, holding values from each point.

May have a known bounding box, which can be retrieved with GeoInterface.bbox.

Fields

  • points: a Vector of Point.
  • MBR: nothing or the known bounding box. Can be retrieved with GeoInterface.bbox.
  • measures: holds values from each point.
source
Shapefile.MultiPointZType
MultiPointZ <: AbstractMultiPoint

Collection of 3d points, from a shape file.

Includes a measures field, holding values from each point.

May have a known bounding box, which can be retrieved with GeoInterface.bbox.

Fields

  • points: a Vector of Point.
  • zvalues: a Vector of Float64 representing the z dimension values.
  • MBR: nothing or the known bounding box. Can be retrieved with GeoInterface.bbox.
  • measures: holds values from each point.
source
Shapefile.PointType
Point <: AbstractPoint

Point from a shape file.

Fields x, y hold the spatial location.

source
Shapefile.PointMType
PointM <: AbstractPoint

Point from a shape file.

Fields x, y hold the spatial location.

Includes a measure field m, holding a value for the point.

source
Shapefile.PointZType
PointZ <: AbstractPoint

Three dimensional point, from a shape file.

Fields x, y, z hold the spatial location.

Includes a measure field m, holding a value for the point.

source
Shapefile.PolygonType
Polygon <: AbstractPolygon

Represents a Polygon from a shape file.

Fields

  • points: a Vector of Point represents a one or multiple closed areas.
  • parts: a Vector of Int32 indicating the polygon each point belongs to.
  • MBR: nothing or the known bounding box. Can be retrieved with GI.bbox.
source
Shapefile.PolygonMType
PolygonM <: AbstractPolygon

Represents a polygon from a shape file

Fields

  • points: a Vector of Point represents a one or multiple closed areas.
  • parts: a Vector of Int32 indicating the polygon each point belongs to.
  • MBR: nothing or the known bounding box. Can be retrieved with GI.bbox.
  • measures: holds values from each point.
source
Shapefile.PolygonZType
PolygonZ <: AbstractPolygon

A three dimensional polygon from a shape file.

Fields

  • points: a Vector of Point represents a one or multiple closed areas.
  • parts: a Vector of Int32 indicating the polygon each point belongs to.
  • zvalues: a Vector of Float64 representing the z dimension values.
  • MBR: nothing or the known bounding box. Can be retrieved with GI.bbox.
  • measures: holds values from each point.
source
Shapefile.PolylineType
Polyline <: AbstractPolyline

Represents a single or multiple polylines from a shape file.

Fields

  • points: a Vector of Point represents a one or multiple lines.
  • parts: a Vector of Int32 indicating the line each point belongs to.
  • MBR: nothing or the known bounding box. Can be retrieved with GeoInterface.bbox.
source
Shapefile.PolylineMType
PolylineM <: AbstractPolyline

Polyline from a shape file, with measures.

Fields

  • points: a Vector of Point represents a one or multiple lines.
  • parts: a Vector of Int32 indicating the line each point belongs to.
  • MBR: nothing or the known bounding box. Can be retrieved with GeoInterface.bbox.
  • measures: holds values from each point.
source
Shapefile.PolylineZType
PolylineZ <: AbstractPolyline

Three dimensional polyline of from a shape file.

Fields

  • points: a Vector of Point represents a one or multiple lines.
  • parts: a Vector of Int32 indicating the line each point belongs to.
  • zvalues: a Vector of Float64 representing the z dimension values.
  • MBR: nothing or the known bounding box. Can be retrieved with GeoInterface.bbox.
  • measures: holds values from each point.
source
Shapefile.RectType
Rect

A rectangle object to represent the bounding box for other shape file shapes.

source
Shapefile.RowType
Row

Row(geometry, record::DBFTables.Row)

A struct representing a single record in a shapefile.

Property names accessable by row.x are geometry for the geometry object, and the names of the columns in record.

source
Shapefile.TableType
Table

Table(path::AbstractString)
Table(shp::Handle{T}, dbf::DBFTables.Table)

Represents both geometries and their associated fields as a Tables.jl compatible table, where each row is is a an object such as a (Point](@ref), Polyline or Polygon.

The Shapefile.Table constructor can read either a String path to a shapefile, or a Shapefile.Handle and a DBFTables.Table.

Property names accessable by table.x are geometry for the geometry object, and the names of the columns in dbf.

source
Shapefile.WriterType
Writer(geoms, tbl = Shapefile.emptytable(geoms), crs = nothing)

Prepared data for writing as shapefile.

  • geoms must be an iterator where elements satisfy GeoInterface.isgeometry(x) or ismissing(x).
  • tbl must be a Tables.jl table of features associated with the geoms.
  • crs can be nothing or something that can be converted to GeoFormatTypes.ESRI.WellKnownText{GeoFormatTypes.CRS}.
source
Base.iterateFunction
Base.iterate(t::Table)

Iterate over the rows of a Shapefile.Table, yielding a Shapefile.Row for each row.

source
Shapefile.shapeMethod
shape(row::Row)

Get the geometry associated with a Row from a shapefile Table.

source
Shapefile.shapesMethod
shapes(t::Table)

Get a vector of the geometries in a shapefile Table, without any metadata.

source
Shapefile.writeMethod
write(path::AbstractString, w::Shapefile.Writer; force=false)

See ?Shapefile.Writer for details.

source