管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2022-11-10 c0b6fcb60e9937b09e81ce32dd4b30ac5cb0024d
1
已添加5个文件
795 ■■■■■ 文件已修改
ExportMap/Sources/Layout.qpt 558 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Sources/main.py 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Sources/render_bak.py 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Sources/ui.py 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Sources/说明.txt 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Sources/Layout.qpt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,558 @@
<Layout printResolution="300" name="TestLayout" worldFileMap="{95fd7a40-049b-4350-9f5a-6e3acdce4327}" units="mm">
 <Snapper snapToGuides="1" snapToGrid="1" tolerance="5" snapToItems="1"/>
 <Grid offsetY="0" resUnits="mm" resolution="10" offsetUnits="mm" offsetX="0"/>
 <PageCollection>
  <symbol force_rhr="0" alpha="1" type="fill" clip_to_extent="1" name="">
   <layer class="SimpleFill" enabled="1" pass="0" locked="0">
    <prop v="3x:0,0,0,0,0,0" k="border_width_map_unit_scale"/>
    <prop v="255,255,255,255" k="color"/>
    <prop v="miter" k="joinstyle"/>
    <prop v="0,0" k="offset"/>
    <prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
    <prop v="MM" k="offset_unit"/>
    <prop v="35,35,35,255" k="outline_color"/>
    <prop v="no" k="outline_style"/>
    <prop v="0.26" k="outline_width"/>
    <prop v="MM" k="outline_width_unit"/>
    <prop v="solid" k="style"/>
    <data_defined_properties>
     <Option type="Map">
      <Option type="QString" value="" name="name"/>
      <Option name="properties"/>
      <Option type="QString" value="collection" name="type"/>
     </Option>
    </data_defined_properties>
   </layer>
  </symbol>
  <LayoutItem itemRotation="0" uuid="{8e6af7e2-d503-4f06-ada4-f9875107df83}" frame="false" outlineWidthM="0.3,mm" blendMode="0" excludeFromExports="0" positionLock="false" templateUuid="{8e6af7e2-d503-4f06-ada4-f9875107df83}" type="65638" size="297,210,mm" opacity="1" frameJoinStyle="miter" zValue="0" background="true" id="" position="0,0,mm" referencePoint="0" positionOnPage="0,0,mm" visibility="1" groupUuid="">
   <FrameColor blue="0" alpha="255" green="0" red="0"/>
   <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
   <LayoutObject>
    <dataDefinedProperties>
     <Option type="Map">
      <Option type="QString" value="" name="name"/>
      <Option name="properties"/>
      <Option type="QString" value="collection" name="type"/>
     </Option>
    </dataDefinedProperties>
    <customproperties/>
   </LayoutObject>
   <symbol force_rhr="0" alpha="1" type="fill" clip_to_extent="1" name="">
    <layer class="SimpleFill" enabled="1" pass="0" locked="0">
     <prop v="3x:0,0,0,0,0,0" k="border_width_map_unit_scale"/>
     <prop v="255,255,255,255" k="color"/>
     <prop v="miter" k="joinstyle"/>
     <prop v="0,0" k="offset"/>
     <prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
     <prop v="MM" k="offset_unit"/>
     <prop v="35,35,35,255" k="outline_color"/>
     <prop v="no" k="outline_style"/>
     <prop v="0.26" k="outline_width"/>
     <prop v="MM" k="outline_width_unit"/>
     <prop v="solid" k="style"/>
     <data_defined_properties>
      <Option type="Map">
       <Option type="QString" value="" name="name"/>
       <Option name="properties"/>
       <Option type="QString" value="collection" name="type"/>
      </Option>
     </data_defined_properties>
    </layer>
   </symbol>
  </LayoutItem>
  <GuideCollection visible="1"/>
 </PageCollection>
 <LayoutItem labelText="中国石油天然气管道工程有限公司" itemRotation="0" uuid="{ae0ef846-fa6b-47a5-b1e7-0af1f11c8341}" frame="false" outlineWidthM="0.3,mm" marginY="0" blendMode="0" excludeFromExports="0" positionLock="true" templateUuid="{ae0ef846-fa6b-47a5-b1e7-0af1f11c8341}" type="65641" size="76.0244,9.39831,mm" valign="128" opacity="1" halign="4" frameJoinStyle="miter" zValue="8" background="false" id="" position="212.337,195.29,mm" referencePoint="0" positionOnPage="212.337,195.29,mm" marginX="0" visibility="1" groupUuid="" htmlState="0">
  <FrameColor blue="0" alpha="255" green="0" red="0"/>
  <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
  <LabelFont style="常规" description="宋体,14,-1,5,50,0,0,0,0,0,常规"/>
  <FontColor blue="0" alpha="255" green="0" red="0"/>
 </LayoutItem>
 <LayoutItem pictureHeight="10.4237" mapUuid="{95fd7a40-049b-4350-9f5a-6e3acdce4327}" itemRotation="0" uuid="{fb2d0661-f39e-4739-a978-b7ebc191a722}" frame="false" outlineWidthM="0.3,mm" blendMode="0" pictureRotation="90" excludeFromExports="0" positionLock="true" templateUuid="{fb2d0661-f39e-4739-a978-b7ebc191a722}" type="65640" svgBorderColor="0,0,0,255" size="10.4237,11.1743,mm" northMode="0" pictureWidth="8.25774" resizeMode="0" opacity="1" frameJoinStyle="miter" northOffset="0" zValue="8" background="false" id="指北针" svgFillColor="255,255,255,255" position="277.938,2.42978,mm" svgBorderWidth="0.2" referencePoint="0" positionOnPage="277.938,2.42978,mm" file=":/images/north_arrows/layout_default_north_arrow.svg" mode="0" visibility="1" groupUuid="" anchorPoint="0">
  <FrameColor blue="0" alpha="255" green="0" red="0"/>
  <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
 </LayoutItem>
 <LayoutItem pictureHeight="10.7409" mapUuid="" itemRotation="0" uuid="{9f93543c-2d87-4b0e-9fcf-f4044036a0a1}" frame="false" outlineWidthM="0.3,mm" blendMode="0" pictureRotation="0" excludeFromExports="0" positionLock="true" templateUuid="{9f93543c-2d87-4b0e-9fcf-f4044036a0a1}" type="65640" svgBorderColor="0,0,0,255" size="11.6809,10.7409,mm" northMode="0" pictureWidth="11.4207" resizeMode="0" opacity="1" frameJoinStyle="miter" northOffset="0" zValue="7" background="false" id="" svgFillColor="255,255,255,255" position="200.5,194.948,mm" svgBorderWidth="0.2" referencePoint="0" positionOnPage="200.5,194.948,mm" file="../../terrait/CPPE/CPPE/imgs/logo.png" mode="1" visibility="1" groupUuid="" anchorPoint="0">
  <FrameColor blue="0" alpha="255" green="0" red="0"/>
  <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
 </LayoutItem>
 <LayoutItem itemRotation="0" uuid="{37d9aa35-1483-496b-8987-725bbce53515}" frame="false" sectionWidth="43.1968" outlineWidthM="0.3,mm" blendMode="0" excludeFromExports="0" sectionHeight="25.6574" positionLock="true" templateUuid="{37d9aa35-1483-496b-8987-725bbce53515}" type="65647" size="43.1968,25.6574,mm" sectionY="0" sectionX="0" opacity="1" frameJoinStyle="miter" zValue="6" hidePageIfEmpty="0" background="false" id="说明" multiFrameTemplateUuid="{3f590e9a-19b4-46d3-90bb-6a188b24aaa6}" position="242.194,161,mm" referencePoint="0" positionOnPage="242.194,161,mm" hideBackgroundIfEmpty="0" visibility="1" groupUuid="" multiFrame="{3f590e9a-19b4-46d3-90bb-6a188b24aaa6}">
  <FrameColor blue="0" alpha="255" green="0" red="0"/>
  <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
 </LayoutItem>
 <LayoutItem labelText="管道基础大数据平台(DW1-1)" itemRotation="0" uuid="{bd216b40-3917-4158-9fc0-7f0df0a7a84c}" frame="false" outlineWidthM="0.3,mm" marginY="0" blendMode="0" excludeFromExports="0" positionLock="true" templateUuid="{bd216b40-3917-4158-9fc0-7f0df0a7a84c}" type="65641" size="129.364,11.1743,mm" valign="128" opacity="1" halign="4" frameJoinStyle="miter" zValue="4" background="false" id="" position="84.816,2.42978,mm" referencePoint="0" positionOnPage="84.816,2.42978,mm" marginX="0" visibility="1" groupUuid="" htmlState="0">
  <FrameColor blue="0" alpha="255" green="0" red="0"/>
  <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
  <LabelFont style="Bold" description="微软雅黑,24,-1,5,75,0,0,0,0,0,Bold"/>
  <FontColor blue="0" alpha="255" green="0" red="0"/>
 </LayoutItem>
 <LayoutItem minSymbolSize="0" visibility="1" position="12.9877,147.385,mm" wrapChar="" columnSpace="2" maxSymbolSize="0" symbolHeight="4" wmsLegendWidth="50" titleAlignment="1" resizeToContents="0" lineSpacing="1" positionOnPage="12.9877,147.385,mm" uuid="{40b9158a-208c-4dbc-8964-5ac43158f9fc}" rasterBorder="1" background="true" outlineWidthM="0.3,mm" groupUuid="" fontColor="#000000" legendFilterByAtlas="0" id="" type="65642" templateUuid="{40b9158a-208c-4dbc-8964-5ac43158f9fc}" columnCount="1" boxSpace="2" equalColumnWidth="0" symbolAlignment="1" zValue="3" wmsLegendHeight="25" positionLock="true" symbolWidth="7" rasterBorderWidth="0" opacity="1" rasterBorderColor="0,0,0,255" frame="false" frameJoinStyle="miter" itemRotation="0" splitLayer="0" referencePoint="0" blendMode="0" excludeFromExports="0" size="70.2172,39.2726,mm" title="图例">
  <FrameColor blue="0" alpha="255" green="0" red="0"/>
  <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
  <styles>
   <style name="title" alignment="1" marginBottom="3.5">
    <styleFont style="" description="SimSun,16,-1,5,50,0,0,0,0,0"/>
   </style>
   <style marginTop="3" name="group" alignment="1">
    <styleFont style="" description="SimSun,14,-1,5,50,0,0,0,0,0"/>
   </style>
   <style marginTop="3" name="subgroup" alignment="1">
    <styleFont style="" description="SimSun,12,-1,5,50,0,0,0,0,0"/>
   </style>
   <style marginTop="2.5" name="symbol" alignment="1">
    <styleFont style="" description="SimSun,9,-1,5,50,0,0,0,0,0"/>
   </style>
   <style marginTop="2" name="symbolLabel" alignment="1" marginLeft="2">
    <styleFont style="" description="SimSun,12,-1,5,50,0,0,0,0,0"/>
   </style>
  </styles>
 </LayoutItem>
 <LayoutItem itemRotation="0" uuid="{95fd7a40-049b-4350-9f5a-6e3acdce4327}" frame="true" isTemporal="0" outlineWidthM="4,px" blendMode="0" excludeFromExports="0" positionLock="true" drawCanvasItems="false" templateUuid="{95fd7a40-049b-4350-9f5a-6e3acdce4327}" mapRotation="90" type="65639" size="278.717,173.294,mm" mapFlags="0" opacity="1" frameJoinStyle="round" followPreset="false" labelMargin="0,mm" zValue="2" keepLayerSet="false" background="true" id="地图" position="9.47563,16.5367,mm" referencePoint="0" positionOnPage="9.47563,16.5367,mm" followPresetName="" visibility="1" groupUuid="">
  <FrameColor blue="0" alpha="255" green="0" red="0"/>
  <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
  <Extent ymin="32.92756964471694658" xmin="65.46900278918894855" xmax="95.28806216935879547" ymax="51.46777955242695413"/>
  <crs>
   <spatialrefsys>
    <wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
    <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
    <srsid>3452</srsid>
    <srid>4326</srid>
    <authid>EPSG:4326</authid>
    <description>WGS 84</description>
    <projectionacronym>longlat</projectionacronym>
    <ellipsoidacronym>EPSG:7030</ellipsoidacronym>
    <geographicflag>true</geographicflag>
   </spatialrefsys>
  </crs>
  <LayerSet/>
  <ComposerMapGrid intervalX="30" gridFrameMargin="0" rotatedTicksEnabled="0" annotationFormat="4" bottomAnnotationDisplay="0" position="3" rightAnnotationDirection="2" gridFramePenColor="0,0,0,255" bottomAnnotationDirection="0" gridFrameWidth="2" bottomFrameDivisions="0" rotatedTicksMinimumAngle="0" frameAnnotationDistance="1" rotatedAnnotationsLengthMode="0" gridFrameStyle="0" offsetY="0" show="1" crossLength="3" rotatedAnnotationsEnabled="0" uuid="{33b582a6-ae09-42c2-b50b-ae68c9d6d71a}" gridStyle="3" leftAnnotationPosition="1" topAnnotationDisplay="0" leftAnnotationDisplay="0" topAnnotationPosition="1" maximumIntervalWidth="10" gridFramePenThickness="0.29999999999999999" offsetX="0" intervalY="30" annotationPrecision="3" frameFillColor2="0,0,0,255" rotatedAnnotationsMarginToCorner="0" frameFillColor1="255,255,255,255" bottomAnnotationPosition="1" leftAnnotationDirection="2" rotatedTicksMarginToCorner="0" leftFrameDivisions="0" unit="1" minimumIntervalWidth="12" rightAnnotationDisplay="0" name="网格 1" annotationExpression="" topFrameDivisions="0" gridFrameSideFlags="15" showAnnotation="1" rotatedAnnotationsMinimumAngle="0" rotatedTicksLengthMode="0" rightFrameDivisions="0" blendMode="0" rightAnnotationPosition="1" topAnnotationDirection="0">
   <lineStyle>
    <symbol force_rhr="0" alpha="0.616" type="line" clip_to_extent="1" name="">
     <layer class="SimpleLine" enabled="1" pass="0" locked="0">
      <prop v="0" k="align_dash_pattern"/>
      <prop v="round" k="capstyle"/>
      <prop v="0.66;2" k="customdash"/>
      <prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
      <prop v="MM" k="customdash_unit"/>
      <prop v="0" k="dash_pattern_offset"/>
      <prop v="3x:0,0,0,0,0,0" k="dash_pattern_offset_map_unit_scale"/>
      <prop v="MM" k="dash_pattern_offset_unit"/>
      <prop v="0" k="draw_inside_polygon"/>
      <prop v="round" k="joinstyle"/>
      <prop v="0,0,0,255" k="line_color"/>
      <prop v="solid" k="line_style"/>
      <prop v="0.5" k="line_width"/>
      <prop v="MM" k="line_width_unit"/>
      <prop v="0" k="offset"/>
      <prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
      <prop v="MM" k="offset_unit"/>
      <prop v="0" k="ring_filter"/>
      <prop v="0" k="tweak_dash_pattern_on_corners"/>
      <prop v="1" k="use_custom_dash"/>
      <prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
      <data_defined_properties>
       <Option type="Map">
        <Option type="QString" value="" name="name"/>
        <Option name="properties"/>
        <Option type="QString" value="collection" name="type"/>
       </Option>
      </data_defined_properties>
     </layer>
    </symbol>
   </lineStyle>
   <markerStyle>
    <symbol force_rhr="0" alpha="1" type="marker" clip_to_extent="1" name="">
     <layer class="SimpleMarker" enabled="1" pass="0" locked="0">
      <prop v="0" k="angle"/>
      <prop v="0,0,0,255" k="color"/>
      <prop v="1" k="horizontal_anchor_point"/>
      <prop v="bevel" k="joinstyle"/>
      <prop v="circle" k="name"/>
      <prop v="0,0" k="offset"/>
      <prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
      <prop v="MM" k="offset_unit"/>
      <prop v="35,35,35,255" k="outline_color"/>
      <prop v="solid" k="outline_style"/>
      <prop v="0" k="outline_width"/>
      <prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
      <prop v="MM" k="outline_width_unit"/>
      <prop v="diameter" k="scale_method"/>
      <prop v="2" k="size"/>
      <prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
      <prop v="MM" k="size_unit"/>
      <prop v="1" k="vertical_anchor_point"/>
      <data_defined_properties>
       <Option type="Map">
        <Option type="QString" value="" name="name"/>
        <Option name="properties"/>
        <Option type="QString" value="collection" name="type"/>
       </Option>
      </data_defined_properties>
     </layer>
    </symbol>
   </markerStyle>
   <spatialrefsys>
    <wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
    <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
    <srsid>3452</srsid>
    <srid>4326</srid>
    <authid>EPSG:4326</authid>
    <description>WGS 84</description>
    <projectionacronym>longlat</projectionacronym>
    <ellipsoidacronym>EPSG:7030</ellipsoidacronym>
    <geographicflag>true</geographicflag>
   </spatialrefsys>
   <text-style fontUnderline="0" previewBkgrdColor="255,255,255,255" textOpacity="1" blendMode="0" fontSize="8" multilineHeight="1" fontSizeMapUnitScale="3x:0,0,0,0,0,0" fontSizeUnit="Point" fontWordSpacing="0" namedStyle="" fontWeight="50" fontStrikeout="0" fontItalic="0" textOrientation="horizontal" capitalization="0" fontFamily="SimSun" textColor="0,0,0,255" fontLetterSpacing="0" allowHtml="0" fontKerning="1">
    <text-buffer bufferJoinStyle="128" bufferDraw="0" bufferSize="1" bufferColor="255,255,255,255" bufferBlendMode="0" bufferOpacity="1" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferSizeUnits="MM" bufferNoFill="1"/>
    <text-mask maskOpacity="1" maskSize="1.5" maskSizeUnits="MM" maskJoinStyle="128" maskSizeMapUnitScale="3x:0,0,0,0,0,0" maskedSymbolLayers="" maskEnabled="0" maskType="0"/>
    <background shapeBorderColor="128,128,128,255" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeSVGFile="" shapeOffsetX="0" shapeBorderWidthUnit="MM" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeRadiiY="0" shapeOffsetY="0" shapeRotation="0" shapeSizeY="0" shapeSizeType="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeRadiiX="0" shapeBlendMode="0" shapeJoinStyle="64" shapeDraw="0" shapeType="0" shapeSizeX="0" shapeBorderWidth="0" shapeRotationType="0" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeOpacity="1" shapeOffsetUnit="MM" shapeRadiiUnit="MM" shapeFillColor="255,255,255,255" shapeSizeUnit="MM">
     <symbol force_rhr="0" alpha="1" type="marker" clip_to_extent="1" name="markerSymbol">
      <layer class="SimpleMarker" enabled="1" pass="0" locked="0">
       <prop v="0" k="angle"/>
       <prop v="231,113,72,255" k="color"/>
       <prop v="1" k="horizontal_anchor_point"/>
       <prop v="bevel" k="joinstyle"/>
       <prop v="circle" k="name"/>
       <prop v="0,0" k="offset"/>
       <prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
       <prop v="MM" k="offset_unit"/>
       <prop v="35,35,35,255" k="outline_color"/>
       <prop v="solid" k="outline_style"/>
       <prop v="0" k="outline_width"/>
       <prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
       <prop v="MM" k="outline_width_unit"/>
       <prop v="diameter" k="scale_method"/>
       <prop v="2" k="size"/>
       <prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
       <prop v="MM" k="size_unit"/>
       <prop v="1" k="vertical_anchor_point"/>
       <data_defined_properties>
        <Option type="Map">
         <Option type="QString" value="" name="name"/>
         <Option name="properties"/>
         <Option type="QString" value="collection" name="type"/>
        </Option>
       </data_defined_properties>
      </layer>
     </symbol>
    </background>
    <shadow shadowRadiusAlphaOnly="0" shadowOpacity="0.7" shadowScale="100" shadowColor="0,0,0,255" shadowRadius="1.5" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowDraw="0" shadowOffsetUnit="MM" shadowRadiusUnit="MM" shadowOffsetAngle="135" shadowOffsetDist="1" shadowOffsetGlobal="1" shadowUnder="0" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowBlendMode="6"/>
    <dd_properties>
     <Option type="Map">
      <Option type="QString" value="" name="name"/>
      <Option name="properties"/>
      <Option type="QString" value="collection" name="type"/>
     </Option>
    </dd_properties>
   </text-style>
   <LayoutObject>
    <dataDefinedProperties>
     <Option type="Map">
      <Option type="QString" value="" name="name"/>
      <Option name="properties"/>
      <Option type="QString" value="collection" name="type"/>
     </Option>
    </dataDefinedProperties>
    <customproperties/>
   </LayoutObject>
  </ComposerMapGrid>
  <AtlasMap atlasDriven="0" margin="0.10000000000000001" scalingMode="2"/>
  <labelBlockingItems/>
  <atlasClippingSettings forceLabelsInside="0" restrictLayers="0" clippingType="1" enabled="0">
   <layersToClip/>
  </atlasClippingSettings>
  <itemClippingSettings forceLabelsInside="0" clippingType="1" enabled="0" clipSource=""/>
 </LayoutItem>
 <LayoutItem itemRotation="0" uuid="{196a8082-83a1-4c8c-be62-ebceba06906c}" frame="false" outlineWidthM="0.3,mm" blendMode="0" excludeFromExports="0" cornerRadiusMeasure="0,mm" positionLock="true" templateUuid="{196a8082-83a1-4c8c-be62-ebceba06906c}" type="65643" size="292.354,205.447,mm" opacity="1" frameJoinStyle="miter" shapeType="1" zValue="1" background="false" id="边框" position="2.6816,2,mm" referencePoint="0" positionOnPage="2.6816,2,mm" visibility="1" groupUuid="">
  <FrameColor blue="0" alpha="255" green="0" red="0"/>
  <BackgroundColor blue="255" alpha="255" green="255" red="255"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
  <symbol force_rhr="0" alpha="1" type="fill" clip_to_extent="1" name="">
   <layer class="SimpleLine" enabled="1" pass="0" locked="0">
    <prop v="0" k="align_dash_pattern"/>
    <prop v="square" k="capstyle"/>
    <prop v="5;2" k="customdash"/>
    <prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
    <prop v="Pixel" k="customdash_unit"/>
    <prop v="0" k="dash_pattern_offset"/>
    <prop v="3x:0,0,0,0,0,0" k="dash_pattern_offset_map_unit_scale"/>
    <prop v="MM" k="dash_pattern_offset_unit"/>
    <prop v="0" k="draw_inside_polygon"/>
    <prop v="bevel" k="joinstyle"/>
    <prop v="53,121,177,255" k="line_color"/>
    <prop v="solid" k="line_style"/>
    <prop v="0.96" k="line_width"/>
    <prop v="Pixel" k="line_width_unit"/>
    <prop v="0" k="offset"/>
    <prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
    <prop v="Pixel" k="offset_unit"/>
    <prop v="0" k="ring_filter"/>
    <prop v="0" k="tweak_dash_pattern_on_corners"/>
    <prop v="0" k="use_custom_dash"/>
    <prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
    <data_defined_properties>
     <Option type="Map">
      <Option type="QString" value="" name="name"/>
      <Option name="properties"/>
      <Option type="QString" value="collection" name="type"/>
     </Option>
    </data_defined_properties>
   </layer>
  </symbol>
 </LayoutItem>
 <LayoutMultiFrame gridColor="0,0,0,255" backgroundColor="255,255,255,255" uuid="{3f590e9a-19b4-46d3-90bb-6a188b24aaa6}" includeHeader="0" showGrid="0" horizontalGrid="1" emptyTableMessage="" templateUuid="{3f590e9a-19b4-46d3-90bb-6a188b24aaa6}" emptyTableMode="0" type="65652" resizeMode="0" wrapBehavior="0" cellMargin="1" showEmptyRows="0" headerHAlignment="0" verticalGrid="1" gridStrokeWidth="0.5" headerMode="2">
  <childFrame uuid="{37d9aa35-1483-496b-8987-725bbce53515}" templateUuid="{37d9aa35-1483-496b-8987-725bbce53515}"/>
  <LayoutObject>
   <dataDefinedProperties>
    <Option type="Map">
     <Option type="QString" value="" name="name"/>
     <Option name="properties"/>
     <Option type="QString" value="collection" name="type"/>
    </Option>
   </dataDefinedProperties>
   <customproperties/>
  </LayoutObject>
  <headerTextFormat>
   <text-style fontUnderline="0" previewBkgrdColor="255,255,255,255" textOpacity="1" blendMode="0" fontSize="10" multilineHeight="1" fontSizeMapUnitScale="3x:0,0,0,0,0,0" fontSizeUnit="Point" fontWordSpacing="0" namedStyle="" fontWeight="50" fontStrikeout="0" fontItalic="0" textOrientation="horizontal" capitalization="0" fontFamily="SimSun" textColor="0,0,0,255" fontLetterSpacing="0" allowHtml="0" fontKerning="1">
    <text-buffer bufferJoinStyle="128" bufferDraw="0" bufferSize="1" bufferColor="255,255,255,255" bufferBlendMode="0" bufferOpacity="1" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferSizeUnits="MM" bufferNoFill="1"/>
    <text-mask maskOpacity="1" maskSize="1.5" maskSizeUnits="MM" maskJoinStyle="128" maskSizeMapUnitScale="3x:0,0,0,0,0,0" maskedSymbolLayers="" maskEnabled="0" maskType="0"/>
    <background shapeBorderColor="128,128,128,255" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeSVGFile="" shapeOffsetX="0" shapeBorderWidthUnit="MM" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeRadiiY="0" shapeOffsetY="0" shapeRotation="0" shapeSizeY="0" shapeSizeType="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeRadiiX="0" shapeBlendMode="0" shapeJoinStyle="64" shapeDraw="0" shapeType="0" shapeSizeX="0" shapeBorderWidth="0" shapeRotationType="0" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeOpacity="1" shapeOffsetUnit="MM" shapeRadiiUnit="MM" shapeFillColor="255,255,255,255" shapeSizeUnit="MM"/>
    <shadow shadowRadiusAlphaOnly="0" shadowOpacity="0.7" shadowScale="100" shadowColor="0,0,0,255" shadowRadius="1.5" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowDraw="0" shadowOffsetUnit="MM" shadowRadiusUnit="MM" shadowOffsetAngle="135" shadowOffsetDist="1" shadowOffsetGlobal="1" shadowUnder="0" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowBlendMode="6"/>
    <dd_properties>
     <Option type="Map">
      <Option type="QString" value="" name="name"/>
      <Option name="properties"/>
      <Option type="QString" value="collection" name="type"/>
     </Option>
    </dd_properties>
   </text-style>
  </headerTextFormat>
  <contentTextFormat>
   <text-style fontUnderline="0" previewBkgrdColor="255,255,255,255" textOpacity="1" blendMode="0" fontSize="10" multilineHeight="1" fontSizeMapUnitScale="3x:0,0,0,0,0,0" fontSizeUnit="Point" fontWordSpacing="0" namedStyle="" fontWeight="50" fontStrikeout="0" fontItalic="0" textOrientation="horizontal" capitalization="0" fontFamily="SimSun" textColor="0,0,0,255" fontLetterSpacing="0" allowHtml="0" fontKerning="1">
    <text-buffer bufferJoinStyle="128" bufferDraw="0" bufferSize="1" bufferColor="255,255,255,255" bufferBlendMode="0" bufferOpacity="1" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferSizeUnits="MM" bufferNoFill="1"/>
    <text-mask maskOpacity="1" maskSize="1.5" maskSizeUnits="MM" maskJoinStyle="128" maskSizeMapUnitScale="3x:0,0,0,0,0,0" maskedSymbolLayers="" maskEnabled="0" maskType="0"/>
    <background shapeBorderColor="128,128,128,255" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeSVGFile="" shapeOffsetX="0" shapeBorderWidthUnit="MM" shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeRadiiY="0" shapeOffsetY="0" shapeRotation="0" shapeSizeY="0" shapeSizeType="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeRadiiX="0" shapeBlendMode="0" shapeJoinStyle="64" shapeDraw="0" shapeType="0" shapeSizeX="0" shapeBorderWidth="0" shapeRotationType="0" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeOpacity="1" shapeOffsetUnit="MM" shapeRadiiUnit="MM" shapeFillColor="255,255,255,255" shapeSizeUnit="MM"/>
    <shadow shadowRadiusAlphaOnly="0" shadowOpacity="0.7" shadowScale="100" shadowColor="0,0,0,255" shadowRadius="1.5" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowDraw="0" shadowOffsetUnit="MM" shadowRadiusUnit="MM" shadowOffsetAngle="135" shadowOffsetDist="1" shadowOffsetGlobal="1" shadowUnder="0" shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowBlendMode="6"/>
    <dd_properties>
     <Option type="Map">
      <Option type="QString" value="" name="name"/>
      <Option name="properties"/>
      <Option type="QString" value="collection" name="type"/>
     </Option>
    </dd_properties>
   </text-style>
  </contentTextFormat>
  <displayColumns>
   <column attribute="" width="0" hAlignment="1" vAlignment="128" heading="" sortByRank="0" sortOrder="0">
    <backgroundColor blue="0" alpha="0" green="0" red="0"/>
   </column>
   <column attribute="" width="0" hAlignment="1" vAlignment="128" heading="说明" sortByRank="0" sortOrder="0">
    <backgroundColor blue="0" alpha="0" green="0" red="0"/>
   </column>
  </displayColumns>
  <sortColumns/>
  <cellStyles>
   <oddColumns enabled="0" cellBackgroundColor="255,255,255,255"/>
   <evenColumns enabled="0" cellBackgroundColor="255,255,255,255"/>
   <oddRows enabled="0" cellBackgroundColor="255,255,255,255"/>
   <evenRows enabled="0" cellBackgroundColor="255,255,255,255"/>
   <firstColumn enabled="0" cellBackgroundColor="255,255,255,255"/>
   <lastColumn enabled="0" cellBackgroundColor="255,255,255,255"/>
   <headerRow enabled="0" cellBackgroundColor="255,255,255,255"/>
   <firstRow enabled="0" cellBackgroundColor="255,255,255,255"/>
   <lastRow enabled="0" cellBackgroundColor="255,255,255,255"/>
  </cellStyles>
  <headers>
   <header attribute="" width="0" hAlignment="1" vAlignment="128" heading="" sortByRank="0" sortOrder="0">
    <backgroundColor blue="0" alpha="0" green="0" red="0"/>
   </header>
   <header attribute="" width="0" hAlignment="1" vAlignment="128" heading="说明" sortByRank="0" sortOrder="0">
    <backgroundColor blue="0" alpha="0" green="0" red="0"/>
   </header>
  </headers>
  <contents>
   <row>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="说" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="2" name="halign"/>
     <Option type="int" value="0" name="valign"/>
    </Option>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="明" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="0" name="halign"/>
     <Option type="int" value="0" name="valign"/>
    </Option>
   </row>
   <row>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="省份:" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="2" name="halign"/>
     <Option type="int" value="128" name="valign"/>
    </Option>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="河北省" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="1" name="halign"/>
     <Option type="int" value="128" name="valign"/>
    </Option>
   </row>
   <row>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="比例尺:" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="2" name="halign"/>
     <Option type="int" value="128" name="valign"/>
    </Option>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="1:25万" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="1" name="halign"/>
     <Option type="int" value="128" name="valign"/>
    </Option>
   </row>
   <row>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="影像分辨率:" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="0" name="halign"/>
     <Option type="int" value="0" name="valign"/>
    </Option>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="20ç±³" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="0" name="halign"/>
     <Option type="int" value="0" name="valign"/>
    </Option>
   </row>
   <row>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="制图时间:" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="2" name="halign"/>
     <Option type="int" value="0" name="valign"/>
    </Option>
    <Option type="Map">
     <Option type="color" value="" name="background"/>
     <Option type="QString" value="2019.10.15" name="content"/>
     <Option type="color" value="" name="foreground"/>
     <Option type="int" value="0" name="halign"/>
     <Option type="int" value="0" name="valign"/>
    </Option>
   </row>
  </contents>
  <rowHeights>
   <row height="0"/>
   <row height="0"/>
   <row height="0"/>
   <row height="0"/>
   <row height="0"/>
  </rowHeights>
  <columnWidths>
   <column width="0"/>
   <column width="0"/>
  </columnWidths>
 </LayoutMultiFrame>
 <customproperties>
  <property key="atlasRasterFormat" value="png"/>
  <property key="imageAntialias" value="true"/>
  <property key="imageCropMarginBottom" value="0"/>
  <property key="imageCropMarginLeft" value="0"/>
  <property key="imageCropMarginRight" value="0"/>
  <property key="imageCropMarginTop" value="0"/>
  <property key="imageCropToContents" value="false"/>
  <property key="rasterize" value="true"/>
  <property key="singleFile" value="true"/>
 </customproperties>
 <Atlas coverageLayer="" filenamePattern="'output_'||@atlas_featurenumber" pageNameExpression="" hideCoverage="0" enabled="0" sortFeatures="0" filterFeatures="0"/>
</Layout>
ExportMap/Sources/main.py
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
from qgis.core import *
from qgis.gui import *
from qgis.PyQt.QtGui import (QColor)
# QgsApplication.setPrefixPath("e:/", True)
qgs = QgsApplication([], True)
qgs.initQgis()
# åˆ›å»ºå®žä¾‹
project = QgsProject.instance()
project.read(r'E:/data/1.Natural_Earth/Test.qgz')
print("FileName: " + project.fileName())
# canvas = QgsMapCanvas()
# canvas.show()
# bridge = QgsLayerTreeMapCanvasBridge(QgsProject.instance().layerTreeRoot(), canvas)
layers_list = {}
for layer in project.mapLayers().values():
    layers_list[layer.name()] = layer
print(layers_list)
openStreetMapLayer = project.mapLayersByName("OpenStreetMap")[0]
print(openStreetMapLayer)
root = project.layerTreeRoot()
print(root.findLayerIds()[0])
# ä¿å­˜ï¼Œå¦å­˜ä¸º
# project.write()
# project.write("E:/new_qgis_project.qgz")
# qgs.exitQgis()
ExportMap/Sources/render_bak.py
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,85 @@
import os
from qgis.core import *
from qgis.gui import *
from qgis.PyQt.QtGui import *
from qgis.PyQt.QtCore import *
from qgis.PyQt.QtWidgets import *
from qgis.PyQt.QtXml import *
def finished():
    img = render.renderedImage()
    # QgsProject.instance().homePath()
    image_location = os.path.join("e:/", "render.png")
    # save the image; e.g. img.save("/Users/myuser/render.png","png")
    img.save(image_location, "png")
QgsApplication.setPrefixPath("C:/Program Files/QGIS 3.16/bin", True)
qgs = QgsApplication([], True)
qgs.initQgis()
# vlayer = iface.activeLayer()
project = QgsProject.instance()
project.read(r'E:/data/1.Natural_Earth/Test.qgz')
layers = project.mapLayers().values()
# root = project.layerTreeRoot()
# layout = QgsPrintLayout(project)
layout = QgsLayout(project)
layout.initializeDefaults()
with open("E:/data/1.Natural_Earth/Layout.qpt", 'r', encoding='utf-8') as f:
    template_content = f.read()
doc = QDomDocument()
doc.setContent(template_content)
# doc = QDomDocument("E:/data/1.Natural_Earth/Layout.qpt")
#ele = layout.writeXml(doc, QgsReadWriteContext())
#layout.readLayoutXml(ele, doc, QgsReadWriteContext())
layout.loadFromTemplate(doc, QgsReadWriteContext(), False)
map = QgsLayoutItemMap(layout)
# # map.zoomToExtent(layers[0].extent())
layout.addItem(map)
# collection = layout.pageCollection()
# page = QgsLayoutItemPage(layout)
# page.setPageSize('A4')
# collection.addPage(page)
layoutView = QgsLayoutView()
layoutView.setPreviewModeEnabled(True)
layoutView.setContentsMargins(0, 0, 0, 0)
layoutView.setCurrentLayout(layout)
# map = QgsLayoutItemMap(layout)
# # map.zoomToExtent(layers[0].extent())
# # map.attemptResize(QgsLayoutSize(2480, 1748, QgsUnitTypes.LayoutPixels))
# layout.addItem(map)
# collection = layout.pageCollection()
# collection.deletePage(0)
# page = QgsLayoutItemPage(layout)
# page.setPageSize('A5', True)
# collection.addPage(page)
# collection.redraw()
# collection = layout.pageCollection()
# page = collection.page(0)
# # QgsUnitTypes.LayoutCentimeters
# # size = QgsLayoutSize(2480, 1748, QgsUnitTypes.LayoutPixels)
# page.setPageSize('A5', True)
# imgSetting = QgsLayoutExporter.ImageExportSettings()
# imgSetting.imageSize.width = 4096
# imgSetting.imageSize.heigth = 3507
# layout.updateBounds()
# layout.refresh()
# page.redraw()
# collection.redraw()
exporter = QgsLayoutExporter(layout)
img_path = os.path.join("e:/", "render.png")
exporter.exportToImage(img_path, QgsLayoutExporter.ImageExportSettings())
qgs.exitQgis()
ExportMap/Sources/ui.py
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
import os
import sys
from qgis.gui import *
from qgis.core import *
from qgis.PyQt.QtCore import *
from qgis.PyQt.QtWidgets import *
class MapViewer(QMainWindow):
    def __init__(self, shapefile):
        QMainWindow.__init__(self)
        self.setWindowTitle("Map Viewer")
        canvas = QgsMapCanvas()
        canvas.setCanvasColor(Qt.white)
        canvas.show()
        project = QgsProject.instance()
        project.read(r'E:/data/1.Natural_Earth/Test.qgz')
        layer = QgsVectorLayer(shapefile, "layer1", "ogr")
        if not layer.isValid():
            raise IOError("Invalid shapefile")
        # project.addMapLayer(layer)
        # canvas.setExtent(layer.extent())
        # canvas.setLayers([layer])
        layers = project.mapLayers().values()
        canvas.setLayers(layers)
        layout = QVBoxLayout()
        layout.addWidget(canvas)
        contents = QWidget()
        contents.setLayout(layout)
        self.setCentralWidget(contents)
if __name__ == "__main__":
    QgsApplication.setPrefixPath("qgis", True)
    qgs = QgsApplication([], True)
    qgs.initQgis()
    viewer = MapViewer("./data/Counties.shp")
    viewer.show()
    exitCode = qgs.exec()
    qgs.exitQgis()
ExportMap/Sources/˵Ã÷.txt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
================================================================================ QGIS环境配置
1.path è®¾ç½®ï¼š
C:\Program Files\QGIS 3.16\apps\Python37;
C:\Program Files\QGIS 3.16\bin;
C:\Program Files\QGIS 3.16\apps\qgis-ltr\bin;
2.PYTHONPATH è®¾ç½®ï¼š
C:\Program Files\QGIS 3.16\apps\qgis-ltr\python;
C:\Program Files\QGIS 3.16\apps\qgis-ltr\bin;
C:\Program Files\QGIS 3.16\apps\qgis-ltr\python\qgis;
C:\Program Files\QGIS 3.16\apps\Python37\Lib;
C:\Program Files\QGIS 3.16\apps\Python37\Lib\site-packages;
C:\Program Files\QGIS 3.16\apps\Python37\DLLs;
C:\Program Files\QGIS 3.16\apps\Python37\Scripts;
3.PYTHONHOME è®¾ç½®ï¼š
C:\Program Files\QGIS 3.16\apps\Python37;
4.检查配置(如果没有提示错误,即可以认为配置成功):
>>> from qgis.core import *
>>> import qgis.core
python E:/terrait/TianJin/ExportMap/ExportMap/Sources/render.py -qgz Test.qgz -qpt Template.qpt
================================================================================ åº“简介
格式化:ctrl + alt + l
PyQGIS库的五个包:
qgis.core                 è¿™æ ·å¯ä»¥è®¿é—®æ•´ä¸ªQGIS中使用的核心GIS功能。
qgis.gui                  è¿™å®šä¹‰äº†ä¸€ç³»åˆ—GUI小部件,您可以在自己的程序中包含这些小部件。
qgis.analysis           è¿™æä¾›äº†ç©ºé—´åˆ†æžå·¥å…·æ¥åˆ†æžçŸ¢é‡å’Œæ …格格式数据。
qgis.networkanalysis    è¿™æä¾›äº†æž„建和分析拓扑的工具。
qgis.utils                 è¿™å®žçŽ°äº†å„ç§åŠŸèƒ½ï¼Œå…è®¸æ‚¨ä½¿ç”¨Python使用QGIS应用程序。
================================================================================ æ‰§è¡Œ
exec(open('E:/terrait/TianJin/LFServer/QGIS/render.py', encoding='utf-8').read())
python E:/terrait/TianJin/LFServer/QGIS/main.py
python E:/terrait/TianJin/LFServer/QGIS/render.py -qgz Test.qgz -qpt Test.qpt
================================================================================
https://blog.csdn.net/qq_44894692/article/details/125956196
天地图影像:
http://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=94a34772eb88317fcbf8428e10448561 > æ³¨è®°
http://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=94a34772eb88317fcbf8428e10448561 > å½±åƒ
天地图矢量:
http://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=94a34772eb88317fcbf8428e10448561 > æ³¨è®°
http://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=94a34772eb88317fcbf8428e10448561 > çŸ¢é‡
添加天地图:
https://mp.weixin.qq.com/s?__biz=MzA4NzAzMjc5Mg==&mid=2247484627&idx=1&sn=6a03729cafc8938aa33801c4bccee804&scene=21#wechat_redirect
================================================================================
https://blog.csdn.net/qq_23034515/article/details/107643428
https://vimsky.com/examples/detail/python-ex-qgis.core-QgsPrintLayout-itemByUuid-method.html # ReadWriteXml
https://vimsky.com/zh-tw/examples/detail/python-ex-qgis.core-QgsLayoutFrame-setId-method.html # Python QgsLayoutFrame.setId
https://mrdata.usgs.gov/services/nmra?version=1.3.0 # WMS服务
https://mrdata.usgs.gov/services/nmra?request=getcapabilities&service=WMS&version=1.3.0&
https://mrdata.usgs.gov/services/nmra?request=GetMetadata&layer=Alkaline_AuTe
1.搭建QGIS+Python开发环境
2.承德高新区指挥平台,将和对讲集成到主站点(http协议)下
3.qgis python二次开发
================================================================================
<Extent xmax="146.8160000000000025" ymin="9.56599999999999895" xmin="59.05799999999999272" ymax="64.12399999999999523"/>
A0 = 1200 dpi = 14043 * 9933
A1 =  850 dpi = 9933 * 7015
A2 =  600 dpi = 7015 * 4960
A3 =  424 dpi = 4960 * 3507
A4 =  300 dip = 3507 * 2480
A5 =  212 dip = 2480 * 1748
A6 =  150 dip = 1748 * 1240