Skip to main content

Module india_file

Module india_file 

Source
Expand description

The Survey of India files: what --india-boundary (tiles) and --india-outline (search, routing, datasets) accept, checked before a build reads a coordinate from them.

India is drawn and resolved on its legal boundary, so a wrong file is a legal defect, not a cosmetic one. The two options take DataMeet’s map in two shapes (see NOTICE.md): the polygon file india-composite.geojson, and the lines file tools/india-boundary/derive.py makes from it.

  • --india-boundary takes either. A polygon file is turned into lines here with the algorithm of derive.py (geolith_soi::rings_as_lines), so both give the same tiles.
  • --india-outline needs polygons: a point-in-polygon test cannot be answered from lines, so a lines file is refused, never read as “no India”.

Every file must also be one JSON document in WGS 84 (CRS84, EPSG:4326 or no crs member), hold geometry, and reach India. A file whose hash differs from the pinned DataMeet file is accepted with a warning: a newer map is allowed, but the legal checks of a release were made on the pinned one.

Enums§

IndiaFileError
Why a Survey of India file is refused. Every message names the file and says what to do.
Shape
What a checked file holds.

Functions§

pinned_note
The warning for a file whose hash is not the pinned one, or None when it is. shape says which pinned file to compare with.
read_boundary
The features of an --india-boundary file for a tile build.
read_outline
The polygons of an --india-outline file.