Skip to main content

mapstyler_gdal_adapter 0.1.1 copy "mapstyler_gdal_adapter: ^0.1.1" to clipboard
mapstyler_gdal_adapter: ^0.1.1 copied to clipboard

GDAL/OGR-based geodata adapter — loads vector features from Shapefiles, GeoJSON, GeoPackage and 100+ other formats into StyledFeatureCollection.

mapstyler_gdal_adapter #

GDAL/OGR-based vector data adapter for the mapstyler ecosystem.

Loads Shapefiles, GeoJSON, GeoPackage and other OGR-supported vector formats into StyledFeatureCollection from mapstyler_style.

Features #

  • Vector loading — sync and isolate-based async APIs.
  • Layer selection — choose by layer index or layer name.
  • Feature filtering — OGR spatial and attribute filters before data crosses the FFI boundary.
  • Geometry conversion — Point, LineString, Polygon, MultiPoint, MultiLineString and MultiPolygon.
  • Simplification — native-unit and meter-based tolerance using mapstyler_style geometry simplification.
  • Multi-scale loading — produce several simplification levels in one pass.
  • Layer inspection — names, feature counts, fields, extents, geometry type and CRS.
  • Warnings — unsupported or empty geometries are reported without aborting the load.

Pure Dart API with a native GDAL runtime dependency through gdal_dart.

Usage #

import 'package:mapstyler_gdal_adapter/mapstyler_gdal_adapter.dart';

final result = await loadVectorFile(
  'data/places.geojson',
  simplifyToleranceMeters: 5,
  spatialFilter: (
    minX: 7.0,
    minY: 46.0,
    maxX: 8.0,
    maxY: 47.0,
  ),
);

print('Features: ${result.features.features.length}');
for (final warning in result.warnings) {
  print('Warning: $warning');
}

Native Dependency #

This package uses gdal_dart and requires GDAL/OGR native libraries at runtime.

License #

MIT — see LICENSE.

0
likes
160
points
10
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

GDAL/OGR-based geodata adapter — loads vector features from Shapefiles, GeoJSON, GeoPackage and 100+ other formats into StyledFeatureCollection.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

gdal_dart, mapstyler_style

More

Packages that depend on mapstyler_gdal_adapter