我想为要绘制岩性的地图打印地质图例。 我用它来绘制语言学:
colornames="/GeologyMapColorCodesAndDocumentation/ColorCodesGeologicMap"
gmt psxy "${map_repo}lithology.gmt" $reg $proj -L -aZ=Code -C$colornames -Zzval -O -K >> $1
使用lithology.gmt:
# @VGMT1.0 @GPOLYGON
# @R119.31526783/122.10616999/21.89310323/25.63488771
# @Je4326
# @Jp"+proj=longlat +datum=WGS84 +no_defs "
# @Jw"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]"
# @NGid|Code|Name|Note|Time|Abbrev
# @Tinteger|integer|string|string|string|string
# FEATURE_DATA
>
# @D1|7010|安山岩|安山岩|更新世|α4
# @P
122.07853538 25.62400028
122.07684956 25.62493342
122.07546161 25.62601781
122.07289488 25.62674301
122.07229883 25.62762748
122.07266463 25.63064419
122.07335464 25.63202019
122.07432764 25.63344375
122.07726916 25.63393434
122.07953347 25.63447953
122.07987601 25.63488771
122.08179566 25.6348216
122.08337494 25.6345549
122.08500313 25.63346865
122.08510312 25.63203494
122.08292455 25.62846982
122.08222477 25.62601977
122.08153516 25.62469572
122.08011729 25.62404049
122.07853538 25.62400028
>
# @D2|7010|安山岩|安山岩|更新世|α4
# @P
122.10424213 25.48121473
122.10308919 25.48213736
122.10247849 25.4831236
122.10257125 25.48480864
122.10320436 25.48627749
122.10372775 25.48781035
etc.
我想为出现在地图上的每种岩性绘制一个用代码颜色填充的矩形(地图上没有出现很多其他多边形,ma地图是其中的一个子集)。
我正在考虑使用以下方法选择出现在地图上的多边形:
gmt select "${map_repo}lithology.gmt" $reg > test.txt
但是我最终只得到点而没有属性:
>
120.72416514 24.16392437
120.72699135 24.15006498
120.72789158 24.13938717
120.72816222 24.13157955
120.72753278 24.1287816
120.72716142 24.1241218
120.72501945 24.11549495
120.72299921 24.10943261
120.71692221 24.09594517
120.71198933 24.08603074
120.7046417 24.07681128
120.70084365 24.07121021
120.69854872 24.06590545
120.69589904 24.05832681
120.69312775 24.04864854
120.69237669 24.04398786
即使在我的地图上出现了多边形的子集之后,我也不知道如何继续为一个矩形赋予正确的颜色值。