All Projects → urschrei → polylabel_cmd

urschrei / polylabel_cmd

Licence: MIT License
A command-line utility for generating optimum polygon label coordinates from GeoJSON

Programming Languages

rust
11053 projects
shell
77523 projects
powershell
5483 projects

Projects that are alternatives of or similar to polylabel cmd

nl
geojson and topojson for common dutch areas
Stars: ✭ 30 (+150%)
Mutual labels:  geojson, gis
de9im
DE-9IM spatial predicate library implemented in Javascript.
Stars: ✭ 22 (+83.33%)
Mutual labels:  geojson, gis
Mapshaper
Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files
Stars: ✭ 2,813 (+23341.67%)
Mutual labels:  geojson, gis
Agstoshapefile
Convert ArcGIS Server Dynamic Map Service to GeoJSON and Shapefile
Stars: ✭ 172 (+1333.33%)
Mutual labels:  geojson, gis
open-geo-data-education
Open Geospatial Datasets for GIS Education: This is a repository of open geospatial datasets to be used in an educational context. I created these files over years of teaching Geographic Data Science and GIS. All original datasets are freely available online with open data licenses (see the dataset attribution for details). All the datasets in t…
Stars: ✭ 52 (+333.33%)
Mutual labels:  geojson, gis
L7
🌎 Large-scale WebGL-powered Geospatial Data Visualization analysis framework which relies on Mapbox GL or AMap to render basemaps.
Stars: ✭ 2,517 (+20875%)
Mutual labels:  geojson, gis
cogj-spec
Cloud Optimized GeoJSON spec
Stars: ✭ 36 (+200%)
Mutual labels:  geojson, gis
Featureserver
An open source Geoservices Implementation
Stars: ✭ 66 (+450%)
Mutual labels:  geojson, gis
pyturf
A modular geospatial engine written in python
Stars: ✭ 15 (+25%)
Mutual labels:  geojson, gis
geojson-to-wfs-t-2
A lightweight javascript module to format WFS-T-2 statements from GeoJSON features
Stars: ✭ 21 (+75%)
Mutual labels:  geojson, gis
Mapshaper Plus
Generate geojson files for Echarts Map,base on mapshaper(Echarts 地图数据压缩转换)
Stars: ✭ 163 (+1258.33%)
Mutual labels:  geojson, gis
django-graphql-geojson
GeoJSON support for Graphene Django
Stars: ✭ 61 (+408.33%)
Mutual labels:  geojson, gis
Geomet
GeoMet - Convert GeoJSON to WKT/WKB, and vice versa
Stars: ✭ 123 (+925%)
Mutual labels:  geojson, gis
Django Geojson
django-geojson is a collection of helpers to (de)serialize (Geo)Django objects into GeoJSON.
Stars: ✭ 209 (+1641.67%)
Mutual labels:  geojson, gis
Gis Dataset Brasil
Geographic Information Systems (GIS) Dataset Brasil - Coleção de shapefiles, GeoJSON e TopoJSON prontas para uso
Stars: ✭ 121 (+908.33%)
Mutual labels:  geojson, gis
Mapstore2
Modern webmapping with OpenLayers, Leaflet and React
Stars: ✭ 251 (+1991.67%)
Mutual labels:  geojson, gis
Leaflet Geoman
🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
Stars: ✭ 1,088 (+8966.67%)
Mutual labels:  geojson, gis
Geotools
Official GeoTools repository
Stars: ✭ 1,109 (+9141.67%)
Mutual labels:  geojson, gis
geojson-to-sqlite
CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Stars: ✭ 41 (+241.67%)
Mutual labels:  geojson, gis
turf-go
A Go language port of Turf.js
Stars: ✭ 41 (+241.67%)
Mutual labels:  geojson, gis

Linux / macOS Build Status Windows Build status Crates Link

polylabel_cmd

…is the command-line version of Polylabel. Install it using cargo install polylabel_cmd, or download a binary and put it on your $PATH.
This provides the polylabel command.

Use

Polylabel takes one mandatory argument: a file containing valid GeoJSON containing Polygons and / or MultiPolygons to be labelled. They can be included as a Feature, or a Geometry, or aFeatureCollection or GeometryCollection – you may also mix the two geometries in a FeatureCollection or GeometryCollection.

  • Processing of nested GeometryCollections is supported, but you shouldn't be using those
  • Empty geometries or collections will be left unaltered
  • Non Multi(Polygon) geometries will be left unaltered
  • All properties will be left unaltered

You may also pass:

  • -t or --tolerance, allowing you to fine-tune the tolerance from the default 0.001. Smaller tolerances take longer to calculate
  • -p or --pretty, which will pretty-print the GeoJSON output
  • -s or --stats-only, which will output the number of labelled polygons, but will not output GeoJSON.

Irrespective of input, output is a GeoJSON FeatureCollection. Its contents depend on the input geometry:

  • Polygon: The FeatureCollection contains Point Features
  • MultiPolygon: The FeatureCollection contains MultiPoint Features
  • GeometryCollection: The FeatureCollection contains GeometryCollection Features whose collection members are Points or MultiPoints
  • Other geometries are included in one the above outputs, but are otherwise left unaltered.

Output features retain the order of input features / geometries, and input feature properties are mapped to output features where they exist.

Accuracy

Depending upon the dimensions of your polygon(s), you may require a higher tolerance (i.e. a smaller number) than the default. See here for some guidance on the accuracy provided by each decimal place. The GeoJSON spec recommends a maximum of six decimal places, which provides accuracy around 10cm, which translates to -t 0.000001. This should be sufficient for applications which don't require survey-quality accuracy.

Progress

If you aren't piping the output of the command to a file, polylabel will display progress of the parsing and labelling steps in the terminal, as well as a final count of the labelled polygons.

Validity

While the structure of the input GeoJSON is validated, individual geometries are not validated in the DE-9IM sense. If they self-intersect, have open rings etc., results are not guaranteed to be correct.

Speed

It runs ~10x faster than the NPM package. Polygons are processed in parallel, using Rayon. Note that higher tolerances will result in slower processing.

Binaries

Pre-built binaries are available from releases. Binaries are available for:

  • macOS (x86_64)
  • Linux (x86_64)
  • Windows (x86_64 and i686)

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].