地图比例尺与分辨率的换算关系
def calculate_scale_from_resolution(resolution, server_type):
"""
通过分辨率,计算当前影像比例尺;
例如 resolution为0.6米,这表明图上1dpi表示实地0.6m;
1inch 96dpi 2.54厘米
:param resolution: 分辨率
:return: 比例尺
"""
if server_type == 'IServer_WMTS':
return 1 / (resolution * 90.714 / 2.54 * 100)
return 1 / (resolution * 96 / 2.54 * 100)
def calculate_resolution_from_scale(scale, server_type):
"""
通过比例尺,计算当前影像分辨率;
例如 scale为1:500,这表明图上1厘米表示实地5M;
1inch 96dpi 2.54厘米
:param scale:比例尺
:return:分辨率
"""
if server_type == 'IServer_WMTS':
return round(((1 / scale) / 100) * 2.54 / 90.714, 3)
return round(((1 / scale) / 100) * 2.54 / 96, 3)
if __name__=="__main__":
print(calculate_resolution_from_scale(1/3800,'WMTS'))
scale=calculate_scale_from_resolution(1,'WMTS')
print(1/scale)
地图瓦片切片方案
SuperMap 切片文件
<?xml version="1.0" encoding="UTF-8"?>
<SuperMapCache>
<sml:Version>5.0</sml:Version>
<sml:MinorVersion>1</sml:MinorVersion>
<sml:VersionRequired>5.0</sml:VersionRequired>
<sml:CacheName>鼓楼区(320106)高德地图10091432@鼓楼区(320106)高德地图10091432</sml:CacheName>
<sml:Provider/>
<sml:MapName>鼓楼区(320106)高德地图10091432@鼓楼区(320106)高德地图10091432</sml:MapName>
<sml:HashCode>GC7E14C4FIX</sml:HashCode>
<sml:CoordinateReferenceSystem>
<sml:Nameset>
<sml:name>WGS_1984/Web_Mercator</sml:name>
</sml:Nameset>
<sml:Type>3857</sml:Type>
<sml:EPSGCode>3857</sml:EPSGCode>
<sml:Units>METER</sml:Units>
<sml:GeographicCoordinateSystem>
<sml:Nameset>
<sml:Name>GCS_WGS_1984</sml:Name>
</sml:Nameset>
<sml:Type>4326</sml:Type>
<sml:Units>DEGREE</sml:Units>
<sml:ProjectionHeight>0.0000000000</sml:ProjectionHeight>
<sml:HorizonalGeodeticDatum>
<sml:Nameset>
<sml:Name>D_WGS_1984</sml:Name>
</sml:Nameset>
<sml:Type>6326</sml:Type>
<sml:Ellipsoid>
<sml:Nameset>
<sml:Name>WGS_1984</sml:Name>
</sml:Nameset>
<sml:Type>7030</sml:Type>
<sml:SemiMajorAxis>6378137.0000000000</sml:SemiMajorAxis>
<sml:InverseFlattening>298.2572235630</sml:InverseFlattening>
</sml:Ellipsoid>
</sml:HorizonalGeodeticDatum>
<sml:PrimeMeridian>
<sml:Nameset>
<sml:Name>Greenwich</sml:Name>
</sml:Nameset>
<sml:Type>8901</sml:Type>
<sml:PrimeMeridian>0.0000000000</sml:PrimeMeridian>
</sml:PrimeMeridian>
</sml:GeographicCoordinateSystem>
<sml:MapProjection>
<sml:Nameset>
<sml:Name>SPHERE_MERCATOR</sml:Name>
</sml:Nameset>
<sml:Type>43045</sml:Type>
</sml:MapProjection>
<sml:Parameters>
<sml:FalseEasting>0.0000000000</sml:FalseEasting>
<sml:FalseNorthing>0.0000000000</sml:FalseNorthing>
<sml:CentralMeridian>0.0000000000</sml:CentralMeridian>
<sml:StandardParallel1>0.0000000000</sml:StandardParallel1>
<sml:StandardParallel2>0.0000000000</sml:StandardParallel2>
<sml:ScaleFactor>1.0000000000</sml:ScaleFactor>
<sml:CentralParallel>0.0000000000</sml:CentralParallel>
<sml:Azimuth>0.0000000000</sml:Azimuth>
<sml:FirstPointLongitude>0.0000000000</sml:FirstPointLongitude>
<sml:SecondPointLongitude>0.0000000000</sml:SecondPointLongitude>
<sml:RectifiedAngle>0.0000000000</sml:RectifiedAngle>
</sml:Parameters>
</sml:CoordinateReferenceSystem>
<sml:ImageType>JPG_PNG</sml:ImageType>
<sml:DefaultColor>
<sml:Red>0x01</sml:Red>
<sml:Green>0x02</sml:Green>
<sml:Blue>0x03</sml:Blue>
<sml:Alpha>0x00</sml:Alpha>
</sml:DefaultColor>
<sml:Transparent>TRUE</sml:Transparent>
<sml:ImageCompress>75</sml:ImageCompress>
<sml:FillMargin>TRUE</sml:FillMargin>
<sml:StorageType>Compact</sml:StorageType>
<sml:TileType>LOCAL</sml:TileType>
<sml:HashCodeEnabled>TRUE</sml:HashCodeEnabled>
<sml:ImageSize>256</sml:ImageSize>
<sml:Bounds>
<sml:Left>13221771.404656486585736</sml:Left>
<sml:Top>3772014.471816832665354</sml:Top>
<sml:Right>13224064.515505041927099</sml:Right>
<sml:Bottom>3770332.857194557785988</sml:Bottom>
</sml:Bounds>
<sml:CoordRatio>3.779527559055119</sml:CoordRatio>
<sml:IndexBounds>
<sml:Left>13221771.404656486585736</sml:Left>
<sml:Top>3772014.471816832665354</sml:Top>
<sml:Right>13221772.404656486585736</sml:Right>
<sml:Bottom>3772013.471816832665354</sml:Bottom>
</sml:IndexBounds>
<sml:MapBounds>
<sml:Left>13221771.404656486585736</sml:Left>
<sml:Top>3772014.471816832665354</sml:Top>
<sml:Right>13224064.515505041927099</sml:Right>
<sml:Bottom>3770332.857194557785988</sml:Bottom>
</sml:MapBounds>
<sml:Scales>
<sml:Scale>
<sml:Value>3.3803271483994547e-09</sml:Value>
<sml:Caption>295829355</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>6.7606543196521338e-09</sml:Value>
<sml:Caption>147914677</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>1.352130873071716e-08</sml:Value>
<sml:Caption>73957338</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>2.704261746143432e-08</sml:Value>
<sml:Caption>36978669</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>5.4085236385475e-08</sml:Value>
<sml:Caption>18489334</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>1.0817047277095e-07</sml:Value>
<sml:Caption>9244667</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>2.163409689436049e-07</sml:Value>
<sml:Caption>4622333</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>4.3268203149405975e-07</sml:Value>
<sml:Caption>2311166</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>8.653640629881195e-07</sml:Value>
<sml:Caption>1155583</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>1.7307296236874579e-06</sml:Value>
<sml:Caption>577791</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>3.4614652382353453e-06</sml:Value>
<sml:Caption>288895</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>6.9229544400368302e-06</sml:Value>
<sml:Caption>144447</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>1.384600473533362e-05</sml:Value>
<sml:Caption>72223</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>2.7692392899670462e-05</sml:Value>
<sml:Caption>36111</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>5.5386319579063972e-05</sml:Value>
<sml:Caption>18055</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>0.00011077877478675086</sml:Value>
<sml:Caption>9027</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>0.00022158209616662973</sml:Value>
<sml:Caption>4513</sml:Caption>
</sml:Scale>
<sml:Scale>
<sml:Value>0.00044326241134751772</sml:Value>
<sml:Caption>2256</sml:Caption>
</sml:Scale>
</sml:Scales>
<sml:ClipRegion/>
<sml:IgnoreInvalidDrawing>FALSE</sml:IgnoreInvalidDrawing>
<sml:MVTStyleWithoutFont>FALSE</sml:MVTStyleWithoutFont>
<sml:MVTWithAllField>FALSE</sml:MVTWithAllField>
<sml:MVTTileBuffer>16</sml:MVTTileBuffer>
<sml:MVTTileExtent>4096</sml:MVTTileExtent>
<sml:MVTWithoutFilter>TRUE</sml:MVTWithoutFilter>
<sml:MVTSimplifyGeometry>FALSE</sml:MVTSimplifyGeometry>
<sml:MVTTriangleList>FALSE</sml:MVTTriangleList>
<sml:BuildFromOriginalResolution>FALSE</sml:BuildFromOriginalResolution>
<sml:ScaleOriginalResolution>0.00044326241134751772</sml:ScaleOriginalResolution>
</SuperMapCache>
EPSG带号查询
WGS84的EPSG带号为4326
- http://epsg.io/4326
CGCS2000的EPSG带号为4490 - https://epsg.io/4490
|