tmontaigu / shapefile-rs

Rust library to read & write shapefiles
MIT License
59 stars 19 forks source link

Add macros to create shapes #11

Closed tmontaigu closed 4 years ago

tmontaigu commented 4 years ago

Add macros to create shapes

eg:

use shapefile::polyline;

let poly = polyline!(
    [
        x: 1.0, y: 1.0, m: 5.0,
        x: 2.0, y: 2.0, m: 42.1337
    ],
    [
        x: 3.0, y: 3.0, m: 17.65,
        x: 3.0, y: 3.0, m: 454.4598
    ]
);

Probably only really useful in the tests so that they are less verbose 🤔