Skip to content

v0.3.0

Latest
Compare
Choose a tag to compare
@Guria Guria released this 03 Oct 15:43

Major Features

  1. Unified GeoJSON Type: All GeoJSON types are now represented by a single GeoJSON type with phantom type parameters for better type safety and flexibility.
  2. Strongly Typed Position: Introduced a new Position type with distinct 2D and 3D variants, replacing the previous list-based representation.
  3. Helper Functions: Added position_2d and position_3d functions to easily create strongly typed Position objects.
  4. Improved Type Safety: The use of phantom types allows for better compile-time checks and more precise type information.
  5. Simplified Decoders: Refactored and simplified the decoding logic for better performance and maintainability.

Breaking Changes

  1. GeoJSON Type Structure: The GeoJSON type now uses phantom types to distinguish between different GeoJSON object types. This changes how GeoJSON objects are constructed and used throughout the API.
  2. Position Representation: The Position type is now a variant type (Position2D or Position3D) instead of a list of floats. This affects all functions and types that use or return Position objects.
  3. Geometry Types: Separate types for Geometry, Feature, FeatureCollection have been replaced with variants of the unified GeoJSON type.
  4. Encoder and Decoder Signatures: The signatures of encode_geojson and geojson_decoder have changed to accommodate the new type structure.

Other Improvements

  1. Code Organization: Improved overall code structure for better readability and maintainability.
  2. Documentation: Updated and expanded documentation to reflect the new type system and usage patterns.
  3. Examples: Updated examples in tests and documentation to demonstrate the use of the new API.

Full Changelog: v0.2.0...v0.3.0