パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v3.1.0

maps_toolkit

マップツールキット - 地理測定ユーティリティ - ポリゴンの面積、点間の距離、点間の方位角およびオフセット(`android-maps-utils` の SphericalUtil、PolyUtil のポート)。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
4.8万
いいね数
389
Pub ポイント
160

パッケージをインストール

flutter pub add maps_toolkit

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

maps_toolkit は、マップとの連携に必要な地理空間ユーティリティを提供する Flutter/Dart パッケージです。多角形の面積を計算したり、地理的なポイント間の距離を計算したり、座標間の方位とオフセットを決定するためのツールを提供しており、Android Maps Utils ライブラリの機能を反映しています。クロスプラットフォーム対応を目的としており、Android、iOS、Web、macOS、Windows、Linux をサポートしています。このパッケージは複雑な地理計算を簡素化し、正確な測定や空間解析が必要な位置ベースのアプリケーションに最適です。

用途

  • 地図上の多角形の面積を計算する
  • 2つの座標間の距離を測定する
  • ポイント間の方位角を決定する
  • 座標オフセットの計算
  • 地理空間データの可視化
  • ルート計画と分析

主な機能

  • 多角形の面積計算
  • 距離と方位の計算
  • 座標オフセットユーティリティ
  • クロスプラットフォーム互換性
  • 軽量で統合が簡単
  • Android Maps Utils の移植

適している対象

  • 地図ベースのアプリケーション
  • 位置認識機能
  • GIS関連プロジェクト
  • ナビゲーションおよびルーティングツール
  • リアルタイムトラッキングシステム
  • 空間分析

注意事項

  • 有効な緯度/経度の入力が必要です
  • 組み込みのマップレンダリングなし
  • 正確な測地計算に依存しています
  • 大規模な地形モデリングには適していない
  • google_maps_flutter などのマップウィジェットと組み合わせて使用するのが最適です

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

maps_toolkit

Pub Package Build Status Coverage Status GitHub Issues GitHub Forks GitHub Stars GitHub License

A library for area, distance, heading measurements (spherical_util.dart if port from android-maps-utils).

Getting Started

In your dart/flutter project add the dependency:

 dependencies:
   ...
   maps_toolkit: ^3.0.0

A simple usage example:

import 'package:maps_toolkit/maps_toolkit.dart';

main() {
  val distanceBetweenPoints = SphericalUtil.computeDistanceBetween(
    LatLng(51.5073509, -0.1277583),
    LatLng(48.856614, 2.3522219)
  );

  final p1 = LatLng(45.153474463955796, 39.33852195739747);
  final p2 = LatLng(45.153474463955796, 39.33972358703614);
  final p3 = LatLng(45.15252112936569, 39.33972358703614);
  final p4 = LatLng(45.1525022138355, 39.3385460972786);

  val areaInSquareMeters = SphericalUtil.computeArea([p1, p2, p3, p4, p1]);
}

Usage with Google Maps package (specify a prefix for an import):

import 'package:maps_toolkit/maps_toolkit.dart' as mp;
import 'package:google_maps/google_maps.dart';
import 'package:test/test.dart';

void main() {
  final pointFromToolkit = mp.LatLng(90, 0);
  final pointFromGoogleMap = LatLng(90, 0);

  mp.SphericalUtil.computeAngleBetween(pointFromToolkit, pointFromToolkit);
}

List of functions

  • SphericalUtil.computeArea - calculate the area of a closed path on Earth.

  • SphericalUtil.computeDistanceBetween - calculate the distance between two points, in meters.

  • SphericalUtil.computeHeading - calculate the heading from one point to another point.

  • SphericalUtil.computeLength - calculate the length of the given path, in meters, on Earth.

  • SphericalUtil.computeOffset - calculate the point resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north).

  • SphericalUtil.computeOffsetOrigin - calculate the location of origin when provided with a point destination, meters travelled and original heading.

  • SphericalUtil.computeSignedArea - calculate the signed area of a closed path on Earth.

  • SphericalUtil.interpolate - calculate the point which lies the given fraction of the way between the origin and the destination.

  • PolygonUtil.containsLocation - computes whether the given point lies inside the specified polygon.

  • PolygonUtil.isLocationOnEdge - computes whether the given point lies on or near the edge of a polygon, within a specified tolerance in meters.

  • PolygonUtil.isLocationOnPath - computes whether the given point lies on or near a polyline, within a specified tolerance in meters.

  • PolygonUtil.locationIndexOnPath - computes whether (and where) a given point lies on or near a polyline, within a specified tolerance.

  • PolygonUtil.locationIndexOnEdgeOrPath - computes whether (and where) a given point lies on or near a polyline, within a specified tolerance.

  • PolygonUtil.simplify - simplifies the given poly (polyline or polygon) using the Douglas-Peucker decimation algorithm.

  • PolygonUtil.isClosedPolygon - returns true if the provided list of points is a closed polygon.

  • PolygonUtil.distanceToLine - computes the distance on the sphere between the point p and the line segment start to end.

  • PolygonUtil.decode - decodes an encoded path string into a sequence of LatLngs.

  • PolygonUtil.encode - encodes a sequence of LatLngs into an encoded path string.

Features and bugs

Please file feature requests and bugs at the issue tracker.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。