Skip to content

Commit

Permalink
added yushan suite for mapsforge
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudy Chung committed Oct 21, 2016
1 parent 7c137ff commit 5ef8276
Show file tree
Hide file tree
Showing 2 changed files with 182 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Makefile
Expand Up @@ -6,7 +6,16 @@
# - 4th hex, style -> jing(0), outdoor(1), contrast_outdoor(2), bw(3)

# target SUITE, no default
ifeq ($(SUITE),taiwan)
ifeq ($(SUITE),yushan)
REGION := Yushan
LANG := zh
CODE_PAGE := 950
ELEVATION_FILE = ele_taiwan_10_100_500_moi.osm.pbf
EXTRACT_FILE := taiwan-latest.osm.pbf
POLY_FILE := YushanNationalPark.poly
DEM_NAME := MOI

else ifeq ($(SUITE),taiwan)
REGION := Taiwan
LANG := zh
CODE_PAGE := 950
Expand Down Expand Up @@ -406,11 +415,12 @@ $(EXTRACT):

# OSMOSIS_OPTS
ifneq (,$(strip $(POLY_FILE)))
OSMOSIS_OPTS := $(strip $(OSMOSIS_OPTS) --bounding-polygon file="$(POLIES_DIR)/$(POLY_FILE)")
OSMOSIS_OPTS := $(strip $(OSMOSIS_OPTS) --bounding-polygon file="$(POLIES_DIR)/$(POLY_FILE)" completeWays=no completeRelations=no cascadingRelations=no clipIncompleteEntities=true)
endif

$(PBF): $(EXTRACT) $(ELEVATION)
[ -n "$(REGION)" ]
-rm -rf $@
mkdir -p $(BUILD_DIR)
export JAVACMD_OPTIONS=$(JAVACMD_OPTIONS) && \
sh $(TOOLS_DIR)/osmosis/bin/osmosis \
Expand All @@ -423,7 +433,7 @@ $(PBF): $(EXTRACT) $(ELEVATION)

.PHONY: mapsforge
mapsforge: $(MAPSFORGE)
$(MAPSFORGE): $(PBF) $(TAG_MAPPING)
$(MAPSFORGE): $(PBF) $(TAG_MAPPING) Makefile
[ -n "$(REGION)" ]
mkdir -p $(BUILD_DIR)
export JAVACMD_OPTIONS=-Xmx64G && \
Expand All @@ -433,9 +443,9 @@ $(MAPSFORGE): $(PBF) $(TAG_MAPPING)
preferred-languages="$(MAPSFORGE_NTL)" \
tag-conf-file="$(TAG_MAPPING)" \
polygon-clipping=true way-clipping=true label-position=true \
zoom-interval-conf=10,8,11,14,12,21 \
map-start-zoom=12 map-start-position=25.0378,121.549 \
comment="$(NAME_SHORT) / (c) Map: Rudy; Map data: OSM contributors; DEM data: Taiwan MOI" \
zoom-interval-conf=7,0,7,10,8,11,14,12,21 \
map-start-zoom=12 \
comment="$(VERSION) / (c) Map: Rudy; Map data: OSM contributors; DEM data: Taiwan MOI" \
file="$@"

$(TILES): $(PBF)
Expand Down
166 changes: 166 additions & 0 deletions polies/YushanNationalPark.poly
@@ -0,0 +1,166 @@
polygon
1
120.8484429 23.2966654
120.8403018 23.3006277
120.8324655 23.3073362
120.8281788 23.3148671
120.8254347 23.3210447
120.8276037 23.3266692
120.8334303 23.3345295
120.842053 23.3363394
120.8522547 23.3392851
120.8622561 23.3413069
120.872014 23.3404414
120.8775221 23.343489
120.8830975 23.3508376
120.8900184 23.3545566
120.8955945 23.3588269
120.8981736 23.37006
120.9001616 23.3812783
120.8955954 23.3873954
120.8971134 23.3947465
120.8933653 23.4056139
120.8892187 23.417884
120.8870589 23.4314736
120.8862461 23.4416501
120.8830683 23.4530072
120.8816103 23.4602762
120.8788977 23.4677235
120.8681347 23.4710017
120.8685093 23.4809002
120.8603134 23.4982009
120.8671889 23.5128009
120.8817384 23.5314733
120.8933703 23.5366809
120.9017133 23.545804
120.9115003 23.5523081
120.9170489 23.5563264
120.9215781 23.5593775
120.9300934 23.5608521
120.9414157 23.5591716
120.9531665 23.5696685
120.962263 23.5768507
120.9695316 23.5774734
120.9780703 23.5726861
120.9852685 23.5732654
120.9921687 23.5714768
120.9996619 23.5724075
121.0083659 23.5756385
121.0133003 23.5727262
121.0224868 23.5731079
121.0269472 23.5742173
121.0380193 23.5739542
121.0446057 23.5716951
121.0535451 23.5715446
121.0596529 23.5719109
121.0675216 23.5730806
121.0689483 23.5661949
121.0762697 23.5659347
121.081542 23.5666486
121.0846702 23.5722743
121.0921023 23.570265
121.0933244 23.5652125
121.0964789 23.5599402
121.101458 23.5634527
121.1066073 23.5645
121.1096878 23.5595135
121.1176899 23.5479921
121.1190973 23.5440515
121.1209766 23.5415969
121.121103 23.538146
121.1191016 23.533474
121.1157853 23.5317834
121.116661 23.5275606
121.117528 23.5260697
121.1210178 23.5206001
121.1274605 23.5177886
121.1341315 23.5148574
121.1409189 23.5093814
121.146615 23.5056711
121.1496513 23.4965424
121.1543599 23.4897863
121.1596279 23.4853728
121.1716103 23.4839942
121.1766924 23.4766946
121.1825704 23.4714795
121.1881062 23.4649896
121.1893731 23.4573747
121.1950363 23.4501506
121.2026385 23.4469441
121.2055567 23.439936
121.2116761 23.4387133
121.2149515 23.4305554
121.2210531 23.4215455
121.225307 23.4139931
121.2303255 23.4063366
121.2340246 23.3972507
121.2412735 23.3870841
121.2426141 23.3763021
121.2432591 23.3680926
121.2451114 23.3626173
121.2485783 23.3500849
121.238209 23.3420797
121.2319287 23.3339156
121.2288353 23.3245189
121.2281747 23.3137103
121.2212876 23.3103029
121.2133907 23.3053042
121.2053039 23.3012141
121.1945257 23.2982525
121.1818238 23.2991553
121.1746557 23.3049185
121.1675666 23.306445
121.1623005 23.3077669
121.1586255 23.3145194
121.1517601 23.3151169
121.1452436 23.3045888
121.1364155 23.30407
121.132202 23.3052397
121.1263876 23.3075614
121.1281064 23.3147982
121.1186265 23.3206631
121.1117088 23.3189484
121.103279 23.3123635
121.0963754 23.3111807
121.0888928 23.3115153
121.082956 23.3065938
121.0748569 23.3067679
121.0662191 23.3074692
121.0601731 23.3047784
121.0559102 23.2995911
121.0497468 23.3042682
121.0426103 23.3074634
121.0346478 23.3038295
121.0287772 23.2973571
121.0181161 23.2930777
121.0083656 23.29131
120.9987873 23.2866303
120.9895472 23.2825035
120.9811389 23.2813012
120.9736175 23.2811059
120.9676864 23.2774168
120.9594449 23.2709109
120.9538744 23.2609248
120.9490201 23.2558761
120.9417641 23.2520045
120.9380237 23.2450309
120.9290824 23.2432176
120.9218758 23.2416985
120.9147265 23.2351047
120.9114669 23.2269056
120.9039714 23.2314014
120.8957763 23.2360575
120.885373 23.227238
120.879677 23.2266115
120.8716723 23.226131
120.8629398 23.2304732
120.8559297 23.2378826
120.8496564 23.2446551
120.8385153 23.2487014
120.824385 23.2567569
120.8220387 23.2706766
120.8347895 23.2902467
120.8482911 23.2963908
120.8484429 23.2966654
END
END

0 comments on commit 5ef8276

Please sign in to comment.