m.doc() = "Internal library used by python-mander to calculate scores";
m.def(
"prepGeoJSON",
&complib::PrepGeoJSON,
"Load GeoJSON into memory for quick retrieval later."
);
m.def(
"getListOfUnboundedScores",
&complib::getListOfUnboundedScores,
"Returns a list of unbounded compactness scores."
);
m.def(
"getListOfBoundedScores",
&complib::getListOfBoundedScores,
"Returns a list of bounded compactness scores."
);
m.def(
"getUnboundedScoresForGeoJSON",
&getUnboundedScoresForGeoJSON,
"Takes a GeoJSON string as input, calculates all scores, return a JSON dictionary of the scores keyed to values identified 'id' which are expected to be properties of the GeoJSON objects. If id='', then the object's 0-indexed order is used.",
py::arg("geojson"),
py::arg("id")="",
py::arg("score_list")=""
);
m.def(
"getBoundedScoresForGeoJSON",
&getBoundedScoresForGeoJSON,
"Takes a GeoJSON string as input, calculates all scores, return a JSON dictionary of the scores keyed to values identified 'id' which are expected to be properties of the GeoJSON objects. If id='', then the object's 0-indexed order is used.",
py::arg("gj_subunit"),
py::arg("gj_superunit"),
py::arg("join_on")="",
py::arg("join_id")="",
py::arg("score_list")=""
);
m.def(
"augmentShapefileWithUnboundedScores",
&augmentShapefileWithUnboundedScores,
"Given the filename of a shapefile containing subunits, and another of superunits, this function calculates the scores of its shapes and adds them to the file.",
py::arg("filename"),
py::arg("score_list")=""
);
m.def(
"addUnboundedScoresToNewShapefile",
&addUnboundedScoresToNewShapefile,
"Reads a shapefile, calculates its scores, and outputs a new shapefile.",
py::arg("in_filename")="",
py::arg("out_filename")="",
py::arg("score_list")=""
);
m.def(
"augmentShapefileWithBoundedScores",
&augmentShapefileWithBoundedScores,
"Given the filename of a shapefile containing subunits, and another of superunits, this function calculates the scores of its shapes and adds them to the file.",
py::arg("subunit_filename"),
py::arg("superunit_filename"),
py::arg("join_id")="",
py::arg("score_list")=""
);
m.def(
"addBoundedScoresToNewShapefile",
&addBoundedScoresToNewShapefile,
"Reads a shapefile, calculates its scores, and outputs a new shapefile.",