当前位置:网站首页>Converting ArcGIS style stylesheet files to GeoServer SLD files
Converting ArcGIS style stylesheet files to GeoServer SLD files
2022-07-27 06:40:00 【LEILEI18A】
arcgis style The stylesheet file is converted to geoserver sld file
Catalog
0. Purpose
arcgis mxd perhaps shp The style sheet in the file is converted to geoserver The required sld Stylesheet file .
why:arcgis server(portal) Don't worry about publishing services , But this is the commercial version , If I want to use open source, I need geoserver To implement the , although geoserver Only two-dimensional services are supported , So many data are arcgis To draw , Style sheets need one thing to express the information of data completely , So you're going to have to arcgis The style sheet of is converted to geoserver The required . Many people would suggest using qgis Redraw the style sheet yourself , But there will be mismatches , Why don't you just arcgis The style sheet of is converted to geoserver Needed sld file ;
how: What is said more on the Internet is arcmap2sld,arc2earth, But there are all kinds of problems ( It's not free 、 Installation environment, etc )
1. Explore
At present, I see 2 A more suitable operation scheme , Although it's a little troublesome , But free
[1] Converting ESRI Styles to QGIS XML Using SLYR — open.gis.lab
[2] https://github.com/camptocamp/lyrx2sld
------------------------------------------------------------------------------------------------
[2] arcgis pro lyrx Style sheet to geoserver Supported by sld File code :
# refer https://github.com/GeoCat/bridge-style/issues/59
# lyrx2sld github project That is to GeoCat/bridge-style Based on
import json
from bridgestyle import sld, arcgis
input_file = "/my/path/input.lyrx"
output_file = "/my/path/output.sld"
# Read the *.lyrx JSON
with open(input_file) as f:
esri_style = json.load(f)
# Convert Esri CIM to GeoStyler (intermediate format)
geostyler, _, warnings = arcgis.togeostyler.convert(esri_style)
print(warnings)
# Convert GeoStyler to SLD
sld_output, warnings = sld.fromgeostyler.convert(geostyler)
# Write the XML output string to the destination SLD file
with open(output_file) as f:
f.write(sld_output)2. shortcoming
At present, I have only searched here 2 individual ;
about lyrx2sld, If your is lyr file , Then use arcgis pro Open and save as lyrx File can , Then use the code to directly transfer 【 But many styles can't be changed , Even if geoserver Set up esri Of fonts, The style displays garbled , therefore , Only some styles can be converted ;geoserver Open source really can't do such a detailed style sheet 】
If you get arcgis pro, Then it should be able to export directly , I haven't tested !
stay ArcGIS Right click the toolbar ,customize, choice command tab , Type in the search box style , choice tools, Put the first tool “export map styles” Drag to the toolbar , You can use it . Not explored
边栏推荐
猜你喜欢

Unit integration (grounding) test

Function call of shell script

shell编程规范与变量

Related knowledge of multithreading

ArcGIS for JS API (2) get the ID set of element services

反射器中getattr,hasattr,delattr,setattr的使用

PXE高效批量网络装机

Seven sorting details

Geonode GeoServer win10 installation tutorial (personal test)

Li Kou daily question leetcode 513. find the value in the lower left corner of the tree
随机推荐
七大排序详解
Seven sorting details
Installation, configuration and use of gradle
Knowledge supplement of multithreading
Linu性能调优:面对DDOS攻击,我们如何缓解局面?
Geonode GeoServer win10 installation tutorial (personal test)
Related knowledge of multithreading
Establishment of FTP server
This is my blog
Li Kou's first week's wrong question set
Sexy prime number (acwing daily question)
哈希表简介
Basic knowledge of English: Rules for using attributives Part 2
网络故障排查:用户VLAN下用户无法收到组播报文故障(IGMP Snooping)
Open source WebGIS related knowledge
iptables防火墙
测试基础概括
KVM命令集管理虚拟机
Cesium tutorial (1) interface introduction -3dfiles loading - change mouse operation settings
英语基础知识:非谓语使用规则上篇