npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

justpeth-map-utils

v0.0.1

Published

gis utils

Downloads

1

Readme

地图部分相关方法封装


/**
 * bd09togcj02 百度坐标系 (BD-09) 与 火星坐标系 (GCJ-02)的转换。即 百度 转 谷歌、高德
 * @param bd_lon
 * @param bd_lat
 * @returns
 */
export declare function bd09togcj02(bd_lon: number, bd_lat: number): number[];
/**
 * 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换。即谷歌、高德 转 百度
 * @param lng
 * @param lat
 * @returns
 */
export declare function gcj02tobd09(lng: number, lat: number): number[];
/**
 * WGS84转GCj02
 * @param lng
 * @param lat
 * @returns
 */
export declare function wgs84togcj02(lng: number, lat: number): number[];
/**
 * GCJ02 转换为 WGS84
 * @param lng
 * @param lat
 * @returns
 */
export declare function gcj02towgs84(lng: number, lat: number): number[];
/**
 * 判断是否在国内
 * @param lng
 * @param lat
 * @returns
 */
export declare function out_of_china(lng: number, lat: number): boolean;
/**
 * 根据经纬度获取实际距离
 * @param lon1
 * @param lat1
 * @param lon2
 * @param lat2
 * @returns
 */
export declare function getDistance(lon1: number, lat1: number, lon2: number, lat2: number): number;
/**
 * 根据一个经纬度及距离角度,算出另外一个经纬度
 * @param {*} lon 经度 113.3960698
 * @param {*} lat 纬度 22.941386
 * @param {*} brng 方位角 45 ---- 正北方:000°或360° 正东方:090° 正南方:180° 正西方:270°
 * @param {*} dist 90000距离(米)
 */
export declare function getLonAndLat(lon: number, lat: number, brng: number, dist: number): number[];
export declare interface RectangleGridParams {
    /** 行数 */
    row: number;
    /** 列数 */
    column: number;
    /** 起始点经纬度坐标 wgs84坐标 */
    coordinate: string[] | number[];
    /** 每个格子宽  单位:米*/
    width: number;
    /** 每个格子的高度 单位:米 */
    height: number;
}
/**
 * 通过某个点获取 x * x的 width * height 的网格区域
 * @param params
 * @returns string[] 区域经纬度字符串数组
 */
export declare function getRectangleGridGeomstrs(params: RectangleGridParams): string[];