-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Yao Jiayuan <coreman.seism@gmail.com> Co-authored-by: Dongdong Tian <seisman.info@gmail.com> Co-authored-by: liuzhumei <zhumei.liu.gucas@gmail.com> Co-authored-by: Mijian Xu <gomijianxu@gmail.com>
- Loading branch information
1 parent
f4da24e
commit 4c97c70
Showing
4 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# 中国及邻区地质图 | ||
# | ||
|
||
data=geo3al.gmt | ||
cpt=geoage.cpt | ||
|
||
gmt begin geo3al pdf,png | ||
# 绘制陆地为白色,即灰度 255 | ||
gmt coast -R70/150/13/55 -JM22c -G255 -Baf -BWsNe | ||
|
||
# Plot the geological map by geologic ages | ||
# -aZ="GEN_GLG": use the "GEN_GLG" metadata as the Z value | ||
# -G+z -C$cpt: the fill color is determined by the Z value and the CPT file | ||
gmt plot $data -C$cpt -aZ="GEN_GLG" -G+z | ||
|
||
# Plot rock types using diffenrent patterns (28, 29 and 44) | ||
# -aI="TYPE": using the "TYPE" metadata as ID | ||
# -S"-Iv": only keep data segments that matches "-Iv" (v means "Volcanic rocks") | ||
# -S"-Ii": only keep data segments that matches "-Ii" (i means "Intrusive rocks") | ||
# -S"-Iw": only keep data segments that matches "-Iw" (w means "Ultrabasic igneous rock or ophiolites") | ||
# -Gp28+r500+f100+b-: fill with pattern 28, dpi=500, foreground color=100 (gray), background color=- (transparent) | ||
gmt convert $data -aI="TYPE" -S"-Iv" | gmt plot -Gp28+r500+f100+b- | ||
gmt convert $data -aI="TYPE" -S"-Ii" | gmt plot -Gp29+r500+f100+b- | ||
gmt convert $data -aI="TYPE" -S"-Iw" | gmt plot -Gp44+r500+f100+b- | ||
|
||
# 绘制海洋或者湖泊为 CADETBLUE1 颜色 | ||
gmt coast -SCADETBLUE1 | ||
|
||
# Plot geologic age legend | ||
gmt set FONT_ANNOT_PRIMARY 7p # font for legend labels | ||
cat > age_legend.txt << EOF | ||
H 10 3 Age of rock units | ||
N 3 | ||
EOF | ||
# Output non-empty lines that don't start with "B", "F", "N" or "#" | ||
gawk '!/^($|B|F|N|#)/' $cpt | while read label color period | ||
do | ||
echo "S 0.3c r 0.38c $color 0.3p 0.7c $period" >> age_legend.txt | ||
done | ||
gmt legend age_legend.txt -DJBR+w10.5c+jTR+o0c/-2c+l1.3 -F+p0.7p+g255 -C3p/3p | ||
rm age_legend.txt | ||
|
||
# Plot rock type legend | ||
gmt legend -DJBR+w5.0c+jBR+o0c/2c+l1.9 -F+p0.7p+g255 -C3p/1p <<EOF | ||
H 10 3 Rock type | ||
N 2 | ||
S 0.3c r 0.5c p28+r500+f100+b255 0.3p 0.7c Volcanic rocks | ||
S 0.3c r 0.5c p29+r500+f100+b255 0.3p 0.7c Intrusive rocks | ||
S 0.3c r 0.5c p44+r500+f100+b255 0.3p 0.7c Ultrabasic igneous rock or ophiolites | ||
EOF | ||
gmt end show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Geological time scale categorical color scheme | ||
# Refer to GTS2012 (Gradstein et al., 2012) | ||
# | ||
# Mijian Xu, mailto:mijian.xu@smail.nju.edu.cn | ||
# 17/6/2021 00:10:05 AM | ||
# | ||
#----------------------------------------------------------------------------- | ||
# COLOR_MODEL = RGB | ||
|
||
Q 255/242/186 ;Quaternary | ||
\N 255/230/25 ;Neogene | ||
Pg 253/154/82 ;Paleogene | ||
T 242/249/29 ;Tertiary (undivided) | ||
Cz 255/255/191 ;Cenozoic (undivided) | ||
TK 242/250/140 ;Cretaceous-Tertiary | ||
CzMz 166/216/74 ;Mesozoic-Cenozoic | ||
K 127/198/78 ;Cretaceous | ||
KJ 179/227/238 ;Jurassic-Cretaceous | ||
J 52/178/201 ;Jurassic | ||
JTr 227/185/219 ;Triassic-Jurassic | ||
Tr 201/155/203 ;Triassic | ||
Mz 103/197/202 ;Mesozoic (undivided) | ||
TrP 252/192/178 ;Permian-Triassic | ||
MzPz 251/167/148 ;Paleozoic-Mesozoic | ||
P 240/64/40 ;Permian | ||
PC 166/199/183 ;Carboniferous-Permian | ||
Pzu 153/180/108 ;Upper Paleozoic | ||
C 103/165/153 ;Carboniferous | ||
CD 241/225/157 ;Devonian-Carboniferous | ||
D 203/140/55 ;Devonian | ||
DS 230/245/225 ;Silurian-Devonian | ||
S 179/225/182 ;Silurian | ||
SO 166/219/171 ;Ordovician-Silurian | ||
O 0/146/112 ;Ordovician | ||
OCm 204/235/174 ;Cambrian-Ordovician | ||
Pzl 166/207/134 ;Lower Paleozoic | ||
Cm 127/160/86 ;Cambrian | ||
Pz 153/192/141 ;Paleozoic (undivided) | ||
PtCm 254/217/106 ;Proterozoic-Cambrian | ||
PzpCm 254/191/78 ;Precambrian-Paleozoic | ||
Pt 247/53/99 ;Proterozoic | ||
A 240/4/127 ;Archean | ||
pCm 247/67/112 ;Precambrian (undivided) | ||
|
||
oth gray ;Geology not shown | ||
und white ;Undetermined age | ||
H2O skyblue ;Water | ||
|
||
B black | ||
F white | ||
N gray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
geo3al: 中国及邻区地质图数据 | ||
============================ | ||
|
||
geo3al 数据是由 U.S. Geological Survey (USGS) 提供的中国及邻区地质图数据, | ||
是“\ `世界地质地图 <https://certmapper.cr.usgs.gov/data/apps/world-maps/>`__\ ”的一部分, | ||
数据分辨率为 1:5,000,000。 | ||
|
||
数据文件 | ||
-------- | ||
|
||
中文社区提供了可供 GMT 直接使用的数据文件: | ||
|
||
- :file:`geo3al.gmt`\ :中国及邻区地质图数据 | ||
|
||
数据的具体下载地址和使用方式请见:\ :doc:`/dataset-CN/index`\ 。 | ||
|
||
数据中包含了如下非空间元信息(可以参考 | ||
`geo3al.shp.xml <https://certmapper.cr.usgs.gov/data/we/ofr97470f/spatial/shape/geo3al.shp.xml>`__ | ||
以获取元信息的更多细节): | ||
|
||
- ``NAREA``\ :地层多边形区域的面积(单位 :math:`m^2`) | ||
- ``PERIMETER``\ :地层多边形区域的周长(单位 m) | ||
- ``TYPE``\ :岩性 | ||
- ``GLG``\ :原始地图上显示地表露头的地质年代 | ||
- ``GEN_GLG``\ :编者从 ``GLG`` 中计算得到的地质年代,在单元年龄跨越一个以上地质年龄的情况下用“代”表示 | ||
|
||
示例图 | ||
------ | ||
|
||
下面的示例图使用 :file:`geo3al.gmt` 数据绘制了中国大陆及邻区地质图: | ||
|
||
- 地质年代从数据的 ``GEN_GLG`` 属性中提取,用不同的颜色表示 | ||
- 岩性从数据的 ``TYPE`` 属性中提取,用不同的填充图案表示 | ||
|
||
示例代码中使用的地质年代 CPT 色标文件 :download:`geoage.cpt` | ||
修改自 `GTS2012_epochs <http://soliton.vm.bytemark.co.uk/pub/cpt-city/heine/GTS2012_epochs.cpt>`__\ 。 | ||
|
||
.. literalinclude:: geo3al.sh | ||
|
||
.. image:: https://user-images.githubusercontent.com/3974108/123166472-7376e080-d443-11eb-9289-d8913afed442.png | ||
:width: 95% | ||
:align: center | ||
|
||
数据转换和处理流程 | ||
------------------ | ||
|
||
*以下内容仅供数据维护者参考,一般用户无需关心。* | ||
|
||
1. 从 “\ `World Geologic Maps <https://certmapper.cr.usgs.gov/data/apps/world-maps/>`__\ ” | ||
下载 “Generalized Geology of the Far East” 对应的 Shapefile 压缩文件 | ||
|
||
2. 使用 :doc:`ogr2ogr </table/ogr2ogr>` 将 Shapefile 格式转换为 GMT 可识别的 OGR/GMT 格式:: | ||
|
||
$ ogr2ogr -t_srs EPSG:4326 -f OGR_GMT geo3al.gmt geo3al.shp | ||
|
||
- 原始数据使用的是以米为单位的投影坐标,而非以经纬度表示的地理坐标。因而在使用 | ||
``ogr2ogr`` 时需要加上 ``-t_srs EPSG:4326`` 参数进行坐标转换 | ||
- 转换时 :file:`.dbf`\ 、\ :file:`.prj`\ 、\ :file:`.shx` 等文件必须和 | ||
:file:`shp` 文件放在同一目录下 | ||
|
||
数据转换与处理参考了如下博文: | ||
|
||
- `Mijian Xu <https://home.xumijian.me/>`__ 的博客: | ||
`用 GMT 绘制中国大陆及邻区地质年代图 <https://blog.xumijian.me/post/gmt-geo/>`__ | ||
- `Po-Chin Tseng <https://github.com/jimmytseng79>`__ 的 | ||
`GMT5 教程:地质图 <https://jimmytseng79.github.io/GMT5_tutorials/geology_map.html>`__ | ||
|
||
扩展阅读 | ||
-------- | ||
|
||
`World Geologic Maps <https://certmapper.cr.usgs.gov/data/apps/world-maps/>`__ | ||
提供了几乎所有区域的地质图数据。本文只提供了中国及邻区地质图(即 Generalized Geology of the Far East)。 | ||
需要绘制其他地区地质图的用户可以参考本文的数据处理方式和绘图脚本,但需要注意: | ||
|
||
- 部分原始数据使用的是经纬度坐标,因此格式转换时不需要使用 ``-t_srs EPSG:4326`` | ||
- 每个数据提供的属性可能不同,因而用户应查阅从源文件中解压得到的 ``.xml`` 文件 | ||
以了解数据提供的元信息,并相应地修改绘图脚本。 | ||
|
||
数据来源及引用 | ||
-------------- | ||
|
||
- Steinshouer, D.W., Qiang, J., McCabe, P.J., and Ryder, R.T, 1999, Maps showing geology, oil and gas fields, and geologic provinces of the Asia Pacific region: U.S. Geological Survey Open-File Report 97-470-F, 16 p., https://doi.org/10.3133/ofr97470F. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
CN-border | ||
CN-faults | ||
CN-block/index | ||
geo3al/index | ||
|
||
**下载数据** | ||
|
||
|