# 北斗网格码 **Repository Path**: wei_jun_wei/beidou-grid-code ## Basic Information - **Project Name**: 北斗网格码 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-28 - **Last Updated**: 2025-11-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 生成2D网格编码 # 根据经纬度生成2D网格编码 String gridCode2D = Codec2D.encode(Codec2D.convertLngLatEle(longitude,latitude),6); # 根据生成的2D网格编码,找出此网格的经纬度范围 LatLonHeight latLonHeight = BeidouGridRangeCalculator2D.calculateGridRange2D(gridCode2D, LocationCodeUtils.getCodeLevel(gridCode2D)); # 根据经纬度范围计算出立方体高度 CalculationResult result = CubeHeightCalculator.calculateCubeHeightRange(latLonHeight.getMinLongitude(), latLonHeight.getMaxLongitude(), latLonHeight.getMinLatitude(), latLonHeight.getMaxLatitude()); # 生成3D网格编码 # 根据经纬度、高度生成3D网格编码 ,生成的3D网格编码只有前20位二维网格码会根据级别变化,后12位高程码不会变化 Codec3D.encode2(Codec2D.convertLngLatEle(longitude, latitude, height), 6);