搜索插件、代码仓与 APP 分类

插件详情v0.2.1

geocoder_offline

用于超快速离线逆地理编码的包。搜索将在您选择的文件中进行。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
850
喜欢数
25
Pub 分数
140

安装插件

flutter pub add geocoder_offline

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个高性能的离线反向地理编码包,可使用用户提供的数据文件实现快速的位置到地址查询。专为无互联网连接环境设计,支持多种平台,并通过处理本地地理数据提供准确结果。适用于需要隐私保护、低延迟或在偏远地区可靠运行的应用程序。

适合场景

  • 离线地图应用
  • 注重隐私的位置服务
  • 远程区域导航
  • 低延迟地理编码
  • 字段数据收集
  • 旅行和物流应用

主要特点

  • 快速离线逆地理编码
  • 支持自定义数据文件
  • 跨平台兼容性
  • 最小依赖足迹
  • 高精度,使用本地数据
  • 无需互联网

适合对象

  • 需要离线功能的应用程序
  • 注重用户隐私的开发者
  • 远程地区的基于位置的工具
  • 具有严格数据控制要求的应用程序
  • 对性能敏感的地理位置功能

使用建议

  • 需要手动管理数据文件
  • 文件大小影响应用包
  • 数据准确性取决于输入文件的质量
  • 限于预加载的地理数据
  • 不适合实时全局更新
  • 初始设置需要数据准备

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Offline Geocoder

Dart library for super-fast offline reverse geocoding. Package use k-d tree for a search of the nearest location in a given file. One when Geocoder is initialized, search for location is super-fast, about 4-5 milliseconds.

Data

For using the reverse geocoding library you need to provide а file with data about places among you want to run reverse geocoding. In examples you can see how to use а library with two example files:

  1. GeoNames data file with all world cities with a population above 15 000
  2. USGS data file with USA cities with a population above 5000.

Library allows you to use any other file who has at least data about name, latitude, and longitude of places you want to search.

Usage

Import
import 'package:geocoder_offline/geocoder_offline.dart';
Initialization
var geocoder = GeocodeData(
    File('/example/NationalFedCodes_20191101.csv').readAsStringSync(), //input string
    'FEATURE_NAME', // place name header
    'STATE_ALPHA', // state/countery header
    'PRIMARY_LATITUDE', // latitute header
    'PRIMARY_LONGITUDE', // longitude header
    fieldDelimiter: ',', // fields delimiter
    eol: '\n');
Reverse geocoding
List<LocationResult> result = geocoder.search(41.881832, -87.623177);

Features and bugs

If you any problem using library or you have any new needs, please file feature requests and bugs at the issue tracker.

所属分类

依赖

依赖清单 2 项

  • csv^5.0.0
  • kdtree^0.2.0

源码仓库

使用此插件的项目

暂无相关数据。