ArcGIS Server9.3的瓦片数据迁移到ArcGIS Server10.3上

时间:2022-09-29 17:10:15

实际场景:在ArcGIS Server9.3上,已经存在了一个瓦片服务(TileService),如何将其发布到ArcGIS Server10.3上。
一下是操作步骤:

1.复制ArcGIS Server9.3下的瓦片缓存文件。

这一步需要给到原始的待发布的数据,数据目录的结构如下:
ArcGIS Server9.3的瓦片数据迁移到ArcGIS Server10.3上

2.修改conf.xml配置文件

原conf.xml配置文件格式化后如下:

<?xml version="1.0" encoding="utf-8" ?>
<CacheInfo xsi:type='typens:CacheInfo' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/9.3'>
<TileCacheInfo xsi:type='typens:TileCacheInfo'>
<SpatialReference xsi:type='typens:GeographicCoordinateSystem'>
<WKT>GEOGCS[&quot;GCS_WGS_1984&quot;,DATUM[&quot;D_WGS_1984&quot;,SPHEROID[&quot;WGS_1984&quot;,6378137.0,298.257223563]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433],AUTHORITY[&quot;EPSG&quot;,4326]]</WKT>
<XOrigin>-400</XOrigin>
<YOrigin>-400</YOrigin>
<XYScale>11258999068426.2</XYScale>
<ZOrigin>0</ZOrigin>
<ZScale>1</ZScale>
<MOrigin>-100000</MOrigin>
<MScale>10000</MScale>
<XYTolerance>8.98315284119521e-09</XYTolerance>
<ZTolerance>2</ZTolerance>
<MTolerance>2</MTolerance>
<HighPrecision>true</HighPrecision>
<LeftLongitude>-180</LeftLongitude>
<WKID>4326</WKID>
</SpatialReference>
<TileOrigin xsi:type='typens:PointN'>
<X>-400</X>
<Y>400</Y>
</TileOrigin>
<TileCols>512</TileCols>
<TileRows>512</TileRows>
<DPI>96</DPI>
<PreciseDPI>96</PreciseDPI>
<LODInfos xsi:type='typens:ArrayOfLODInfo'>
<LODInfo xsi:type='typens:LODInfo'><LevelID>0</LevelID><Scale>768000</Scale><Resolution>1.82742601838964e-03</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>1</LevelID><Scale>384000</Scale><Resolution>9.13713009194818e-04</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>2</LevelID><Scale>192000</Scale><Resolution>4.56856504597409e-04</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>3</LevelID><Scale>96000</Scale><Resolution>2.28428252298705e-04</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>4</LevelID><Scale>48000</Scale><Resolution>1.14214126149352e-04</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>5</LevelID><Scale>24000</Scale><Resolution>5.71070630746761e-05</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>6</LevelID><Scale>12000</Scale><Resolution>2.85535315373381e-05</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>7</LevelID><Scale>6000</Scale><Resolution>1.4276765768669e-05</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>8</LevelID><Scale>3000</Scale><Resolution>7.13838288433452e-06</Resolution></LODInfo>
</LODInfos>
</TileCacheInfo>
<TileImageInfo xsi:type='typens:TileImageInfo'>
<CacheTileFormat>JPEG</CacheTileFormat>
<CompressionQuality>90</CompressionQuality>
<Antialiasing>true</Antialiasing>
</TileImageInfo>
</CacheInfo>

做如下修改(主要是将9.3替换为10.3并且添加部分代码):

<?xml version="1.0" encoding="utf-8" ?>
<CacheInfo xsi:type='typens:CacheInfo' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.3'>
<TileCacheInfo xsi:type='typens:TileCacheInfo'>
<SpatialReference xsi:type='typens:GeographicCoordinateSystem'>
<WKT>GEOGCS[&quot;GCS_WGS_1984&quot;,DATUM[&quot;D_WGS_1984&quot;,SPHEROID[&quot;WGS_1984&quot;,6378137.0,298.257223563]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433],AUTHORITY[&quot;EPSG&quot;,4326]]</WKT>
<XOrigin>-400</XOrigin>
<YOrigin>-400</YOrigin>
<XYScale>11258999068426.2</XYScale>
<ZOrigin>0</ZOrigin>
<ZScale>1</ZScale>
<MOrigin>-100000</MOrigin>
<MScale>10000</MScale>
<XYTolerance>8.98315284119521e-09</XYTolerance>
<ZTolerance>2</ZTolerance>
<MTolerance>2</MTolerance>
<HighPrecision>true</HighPrecision>
<LeftLongitude>-180</LeftLongitude>
<WKID>4326</WKID>
</SpatialReference>
<TileOrigin xsi:type='typens:PointN'>
<X>-400</X>
<Y>400</Y>
</TileOrigin>
<TileCols>512</TileCols>
<TileRows>512</TileRows>
<DPI>96</DPI>
<PreciseDPI>96</PreciseDPI>
<LODInfos xsi:type='typens:ArrayOfLODInfo'>
<LODInfo xsi:type='typens:LODInfo'><LevelID>0</LevelID><Scale>768000</Scale><Resolution>1.82742601838964e-03</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>1</LevelID><Scale>384000</Scale><Resolution>9.13713009194818e-04</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>2</LevelID><Scale>192000</Scale><Resolution>4.56856504597409e-04</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>3</LevelID><Scale>96000</Scale><Resolution>2.28428252298705e-04</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>4</LevelID><Scale>48000</Scale><Resolution>1.14214126149352e-04</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>5</LevelID><Scale>24000</Scale><Resolution>5.71070630746761e-05</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>6</LevelID><Scale>12000</Scale><Resolution>2.85535315373381e-05</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>7</LevelID><Scale>6000</Scale><Resolution>1.4276765768669e-05</Resolution></LODInfo>
<LODInfo xsi:type='typens:LODInfo'><LevelID>8</LevelID><Scale>3000</Scale><Resolution>7.13838288433452e-06</Resolution></LODInfo>
</LODInfos>
</TileCacheInfo>
<TileImageInfo xsi:type='typens:TileImageInfo'>
<CacheTileFormat>JPEG</CacheTileFormat>
<CompressionQuality>90</CompressionQuality>
<Antialiasing>true</Antialiasing>
</TileImageInfo>
<CacheStorageInfo xsi:type='typens:CacheStorageInfo'>
<StorageFormat>esriMapCacheStorageModeExploded</StorageFormat>
<PacketSize>0</PacketSize>
</CacheStorageInfo>
</CacheInfo>

3.新增conf.xml

然后,新增一个conf.cdi文件,并将conf.xml中的部分文件复制过过来,添加了坐标范围代码,就行了:

<?xml version="1.0" encoding="utf-8" ?>
<EnvelopeN xsi:type='typens:EnvelopeN' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.3'>
<XMin>120</XMin>
<YMin>30</YMin>
<XMax>122</XMax>
<YMax>32</YMax>
<SpatialReference xsi:type='typens:GeographicCoordinateSystem'>
<WKT>GEOGCS[&quot;GCS_WGS_1984&quot;,DATUM[&quot;D_WGS_1984&quot;,SPHEROID[&quot;WGS_1984&quot;,6378137.0,298.257223563]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433],AUTHORITY[&quot;EPSG&quot;,4326]]</WKT>
<XOrigin>-400</XOrigin>
<YOrigin>-400</YOrigin>
<XYScale>11258999068426.2</XYScale>
<ZOrigin>0</ZOrigin>
<ZScale>1</ZScale>
<MOrigin>-100000</MOrigin>
<MScale>10000</MScale>
<XYTolerance>8.98315284119521E-09</XYTolerance>
<ZTolerance>2</ZTolerance>
<MTolerance>2</MTolerance>
<HighPrecision>true</HighPrecision>
<LeftLongitude>-180</LeftLongitude>
<WKID>4326</WKID>
<LatestWKID>4326</LatestWKID>
</SpatialReference>
</EnvelopeN>

上述代码中的XMin等是地图显示的范围,这个需要根据具体的图层范围给出,由于笔者的实例是上海,因此填的是上海的范围。

4.将数据导入ArcGIS Desktop10.3

最后的目录结构如下:
ArcGIS Server9.3的瓦片数据迁移到ArcGIS Server10.3上
用ArcGIS Desktop10.3打开如下:
ArcGIS Server9.3的瓦片数据迁移到ArcGIS Server10.3上
注意,上图中的Layers就是上上图中路径下的Layers文件夹,由于有了conf.xml和conf.cdi文件,使用ArcGIS Desktop10.3打开时就不是一个目录,而是图层了,效果如下:
ArcGIS Server9.3的瓦片数据迁移到ArcGIS Server10.3上

5.最后发布

发布的方法和一般的ArcGIS发布服务没有太大区别,这里以保存为sd文件为例。唯一的不同如下:
ArcGIS Server9.3的瓦片数据迁移到ArcGIS Server10.3上
添加一下之前的conf.xml的配置文件就行了,分析–预览。不过由于conf.xml需要实现复制到另一个位置,以便这里的选择。

以上,至于conf.xml和conf.cdi文件内的具体含义,笔者不细讲了。
欢迎提问。