// npm 패키지
@antv/geo-coord
> 地理坐标系
주간
1,135
월간
3,023
버전
9
메인테이너
51
라이선스
ISC
최초 publish
2019-04-16
publisher
lzxue
tarball
95,167 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2019-04-16
// publisher 캠페인by lzxue
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @1.0.8· no static-pattern hits
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s), 2 other host(s).
- @1.0.8··AUTO-PUBLISHED·publisher: lzxueheuristic 75/100static flags 0llm benign (0.85) via ollamapopularity:highosv-flagged:MAL-2026-3999
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s), 2 other host(s).
// offending code· no static-pattern hits
--- package.json (entry) --- { "name": "@antv/geo-coord", "version": "1.0.8", "description": "> 地理坐标系", "author": "https://github.com/orgs/antvis/people", "homepage": "", "license": "ISC", "main": "lib/index.js", "types": "lib/index.d.ts", "directories": { "lib": "lib", "test": "__tests__" }, "files": [ "lib" ], "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "" }, "scripts": { "build": "rm -rf lib && tsc", "prepublish": " rm -rf lib && tsc -p ./ --outDir lib/", "coverage": "npm run coverage-generator && npm run coverage-viewer", "coverage-generator": "torch --coverage --compile --renderer --source-pattern ./src/**/*.js --recursive ./__tests__/unit/", "coverage-viewer": "node node_modules/@antv/torch/bin/coverage", "test": "torch --compile --recursive ./__tests__/unit", "test-all": "npm run test && npm run test-bugs", "test-bugs": "torch --compile --renderer --recursive ./__tests__/bugs", "test-bugs-live": "torch --compile --interactive --watch --recursive ./__tests__/bugs", "test-live": "torch --compile --interactive --watch --recursive ./__tests__/unit", "tsc": "tsc --noEmit" --- index.js (entry) --- "use strict"; exports.__esModule = true; var GeoCoordinates = require("./geo"); exports.GeoCoordinates = GeoCoordinates; var bounds_1 = require("./geo/geometry/bounds"); exports.Bounds = bounds_1.Bounds; exports.toBounds = bounds_1.toBounds; var lng_lat_1 = require("./geo/geometry/lng-lat"); exports.LngLat = lng_lat_1.LngLat; exports.toLngLat = lng_lat_1.toLngLat; var lng_lat_bounds_1 = require("./geo/geometry/lng-lat-bounds"); exports.LngLatBounds = lng_lat_bounds_1.LngLatBounds; exports.toLngLatBounds = lng_lat_bounds_1.toLngLatBounds; var point_1 = require("./geo/geometry/point"); exports.Point = point_1.Point; exports.toPoint = point_1.toPoint; //# sourceMappingURL=index.js.map --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- lib/geo/projection/lnglat-projection.js (bundled) --- "use strict"; exports.__esModule = true; var lng_lat_1 = require("../geometry/lng-lat"); var bounds_1 = require("../geometry/bounds"); var point_1 = require("../geometry/point"); exports.lngLatProjection = { project: function (lngLat) { return new point_1.Point(lngLat.lng, lngLat.lat); }, unproject: function (point) { return new lng_lat_1.LngLat(point.x, point.y); }, bounds: new bounds_1.Bounds([-180, -90], [180, 90]) }; //# sourceMappingURL=lnglat-projection.js.map --- lib/geo/projection/spherical-mercator.js (bundled) --- "use strict"; exports.__esModule = true; var lng_lat_1 = require("../geometry/lng-lat"); var bounds_1 = require("../geometry/bounds"); var point_1 = require("../geometry/point"); exports.sphericalMercator = { R: 6378137, MAX_LATITUDE: 85.0511287798, /** * 经纬度坐标转平面坐标 * @param lnglat 经纬度 */ project: function (lnglat) { var d = Math.PI / 180; var max = this.MAX_LATITUDE; var lat = Math.max(Math.min(max, lnglat.lat), -max); var sin = Math.sin(lat * d); return new point_1.Point(this.R * lnglat.lng * d, (this.R * Math.log((1 + sin) / (1 - sin))) / 2); }, // 平面坐标转经纬度 unproject: function (point) { var d = 180 / Math.PI; return new lng_lat_1.LngLat((point.x * d) / this.R, (2 * Math.atan(Math.exp(point.y / this.R)) - Math.PI / 2) * d); }, bounds: (function () { var d = 6378137 * Math.PI; return new bounds_1.Bounds([-d, -d], [d, d]); })() }; //# sourceMappingURL=spherical-mercator.js.map --- lib/geo/geometry/lng-lat-bounds.js (bundled) --- "use strict"; exports.__esModule = true; var lng_lat_1 = require("./lng-lat"); var LngLatBounds = /** @class */ (function () { function LngLatBounds(corner1, corner2) { if (!corner1) { return; } var latlngs = corner2 ? [corner1, corner2] : corner1; if (Array.isArray(latlngs)) { for (var i = 0, len = latlngs.length; i < len; i += 1) { // @ts-ignore this.extend(latlngs[i]); } } } LngLatBounds.prototype.extend = function (obj) { var sw = this.southWest; var ne = this.northEast; var sw2; var ne2; if (obj instanceof lng_lat_1.LngLat) { sw2 = obj; ne2 = obj; } else if (obj instanceof LngLatBounds) { sw2 = obj.southWest; ne2 = obj.northEast; if (!sw2 || !ne2) { return this; } } else { if (obj && Array.isArray(obj)) { if (Array.isArray(obj[0])) { return this.extend(toLngLatBounds(obj)); } return this.extend(lng_lat_1.toLngLat(obj)); } return this; } if (!sw && !ne) { this.southWest = new lng_lat_1.LngLat(sw2.lng, sw2.lat); this.northEast = new lng_lat_1.LngLat(ne2.lng, ne2.lat); } else { sw.lat = Math.min(sw2.lat, sw.lat); sw.lng = Math.min(sw2.lng, sw.lng); ne.lat = Math.max(ne2.lat, ne.lat); ne.lng = Math.max(ne2.lng, ne.lng); } return this; }; /** * 放大或者缩小区域 * @param bufferRatio 缩放比率 */ LngLatBounds.prototype.pad = function (bufferRatio) { var sw = this.southWest; var ne = this.northEast; var heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio; var widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio; retur --- lib/geo/crs/crs-epsg3857.js (bundled) --- "use strict"; exports.__esModule = true; var earth_1 = require("./earth"); var spherical_mercator_1 = require("../projection/spherical-mercator"); var transformation_1 = require("../transformation"); var util_1 = require("@antv/util"); var scale = 0.5 / (Math.PI * spherical_mercator_1.sphericalMercator.R); var transform = new transformation_1.Transformation(scale, 0.5, -scale, 0.5); // @ts-ignore exports.epsg3857 = util_1.mix({}, earth_1.earth, { code: 'EPSG:3857', projection: spherical_mercator_1.sphericalMercator, transformation: transform }); exports.epsg900913 = util_1.mix({}, exports.epsg3857, { code: 'EPSG:900913' }); //# sourceMappingURL=crs-epsg3857.js.map --- lib/geo/crs/crs-epsg4326.js (bundled) --- "use strict"; exports.__esModule = true; var earth_1 = require("./earth"); var lnglat_projection_1 = require("../projection/lnglat-projection"); var transformation_1 = require("../transformation"); var util_1 = require("@antv/util"); var transform = new transformation_1.Transformation(1 / 180, 1, -1 / 180, 0.5); exports.epsg4326 = util_1.mix({}, earth_1.earth, { code: 'EPSG:4326', projection: lnglat_projection_1.lngLatProjection, transformation: transform }); //# sourceMappingURL=crs-epsg4326.js.map --- lib/geo/crs/crs-simple.js (bundled) --- "use strict"; exports.__esModule = true; var crs_1 = require("./crs"); var lnglat_projection_1 = require("../projection/lnglat-projection"); var transformation_1 = require("../transformation"); var util_1 = require("@antv/util"); var transform = new transformation_1.Transformation(1, 0, -1, 0); // @ts-ignore exports.simple = util_1.mix({}, crs_1.CRS, { projection: lnglat_projection_1.lngLatProjection, transformation: transform, scale: function (zoom) { return Math.pow(2, zoom); }, zoom: function (scale) { return Math.log(scale) / Math.LN2; }, distance: function (latlng1, latlng2) { var dx = latlng2.lng - latlng1.lng; var dy = latlng2.lat - latlng1.lat; return Math.sqrt(dx * dx + dy * dy); }, infinite: true }); //# sourceMappingURL=crs-simple.js.map
