package shapefile

  1. Overview
  2. Docs

Read and write ESRI Shapefiles.

This implementation follows the technical description provided by ESRI. This description can be found here.

type shape =
  1. | Null
    (*

    the null shape

    *)
  2. | Point of D2.point
  3. | PointM of D2M.point
  4. | PointZ of D3M.point
    (*

    a single point

    *)
  5. | MultiPoint of D2.bbox * D2.point array
  6. | MultiPointM of D2M.bbox * D2M.point array
  7. | MultiPointZ of D3M.bbox * D3M.point array
    (*

    a set of points with its bounding box

    *)
  8. | PolyLine of D2.bbox * D2.point array array
  9. | PolyLineM of D2M.bbox * D2M.point array array
  10. | PolyLineZ of D3M.bbox * D3M.point array array
    (*

    a set of lines with its bounding box

    *)
  11. | Polygon of D2.bbox * D2.point array array
  12. | PolygonM of D2M.bbox * D2M.point array array
  13. | PolygonZ of D3M.bbox * D3M.point array array
    (*

    a polygon (set of rings) with its bounding box

    *)
  14. | MultiPatch
    (*

    not implemented yet

    *)

The type of a shape.

val read : string -> Common.header * shape list

Shp.read file parses the file and returns a list of shapes.