-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPhotoView.qml
1135 lines (1132 loc) · 81.8 KB
/
PhotoView.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis labelsEnabled="1" version="3.28.2-Firenze" readOnly="0" styleCategories="LayerConfiguration|Symbology|Labeling|Fields|Forms|Actions|AttributeTable">
<flags>
<Identifiable>1</Identifiable>
<Removable>1</Removable>
<Searchable>1</Searchable>
<Private>0</Private>
</flags>
<renderer-v2 enableorderby="0" referencescale="-1" forceraster="0" type="RuleRenderer" symbollevels="0">
<rules key="{4c83798d-3edf-4754-852c-330910c581ec}">
<rule filter="/*
写真表示地物かの条件判定 シンボロジ、ラベル共通
*/
with_variable('para',map(
 'Number', to_int( coalesce(@PhotoView_Number , 8) *if( @qgis_platform<>'mobile',1,if( @map_extent_width > @map_extent_height ,1, @map_extent_width / @map_extent_height ))) ,
 'TopMargin', to_real(coalesce(@PhotoView_TopMargin ,6.0)+if( @qgis_platform='mobile',3,0))*@map_scale/1000,
 'SideMargin', if( @qgis_platform='mobile',9,1) * @map_scale / 1000,
 'PhotoByGap', 15.0),
with_variable('Gap',(@map_extent_width - @para['SideMargin']*2) /((@para['PhotoByGap']+1)*@para['Number']-1),
with_variable('Extent',
	 intersection( @map_extent , translate( @map_extent ,0,-@para['PhotoByGap']*@Gap*0.800-@para['TopMargin'])),
CASE 
WHEN @map_rotation <> 0 THEN false
WHEN attribute( 'invisible' ) THEN false
WHEN not within( $geometry , @Extent ) THEN false
ELSE
with_variable('DistRank', array_find(
	 array_foreach(
	array_sort( 
		array_agg( array( distance( @map_extent_center , $geometry ),$id ) ,filter:=if( attribute( 'invisible' ),false,true) and within( $geometry , @Extent ))
	),
	@element[1])
	,$id),
@DistRank<@para['Number'])
END
)))

" symbol="0" label="PHOTO" key="{580b1a51-0fff-4616-b191-d07f43f2f41a}"/>
<rule filter="ELSE" symbol="1" label="far" key="{11dde42b-66f3-4248-b456-51b3af11524f}"/>
<rule filter="/*
invisible フィールドがtrueの場合は写真表示から除外、アイコンはグレー
*/
 attribute( 'invisible' )

/*
photoview履歴・メモ,motohirooya
2022/2/23 動くものができる
2022/3/2
・引き出し線を曲線(smooth)、引き出し線の起点をラスタ画像マーカと同じに。このため、@LEADER変数が不要に
・invisibleフィールド(真偽値)を導入、値がtrueの場合は写真を非表示、それ以外(false,nll,フィールドが無い場合)は写真を表示)
・photoview_inportモデル作成。invisibleフィールドの追加は属性リファクタリング(フィールド演算、フィールド追加では、真偽値が選べない。バージョンアップで「ジオタグ(位置情報)付きの写真」の出力がかわることに注意)
・撮影位置を矢印から扇に変更
2022/3/13 色の調整、コメントの記載
2022/9/14 ラベルが衝突して表示されないことがあったので、プロジェクト変数に全角文字に対する半角文字の幅のパラメータを追加し、ラベルサイズの計算を行うよう変更(以前は0.66・・・の固定値を使用していた)
ラベルサイズのプロジェクト変数を削除し、写真の上の余白-1mmを最大ラベルサイズとした。
表示範囲外の地物は写真を表示しない条件を追加
2022/9/19 写真と引き出し線が重ならないよう、写真を表示する上部はフィルタ範囲から除外(写真の縦横比は0.800を仮定)
2022/9/23 label フィールド追加、値がある場合はラベルのフィールドとして使用
2022/9/30 PhotoView_SingleByteCaracterWidth の既定値を0.8→0.7
中心点との距離が同一の場合、順序がおかしくなる可能性があったのを修正
labelフィールドがない場合、文字サイズの計算がおかしかったのを修正
2022/10/24 プロジェクト変数未設定時の文字サイズ修正、方位角nullの場合は●を表示、写真選択基準の距離の起点を画面中心から対象範囲(@Extent)に
2022/11/8
シンボルとラベルの色を変数PhotoView_Colorに設定。Qfield用の色々調整。photoフィールドがない場合はrelpathフィールドを参照するように
2022/11/17 with_variableをマップ型オブジェクトでまとめた。写真選択基準の距離の起点を画面中心に戻した。
2023/1/16 "photo"の写真がない場合、 @project_folder ||'/'|| "relpath"を使用する。 
既知の問題
・QGIS3.16では縦撮りの写真が横になる。QGIS3.22では縦になるがアンカー位置が写真の中間部になる(期待されるのは写真上部中央)
・地図の回転には対応しない
*/" symbol="2" label="invisible" key="{3881f3a2-408f-4e64-84f6-d42475562fae}"/>
</rules>
<symbols>
<symbol alpha="0.6" frame_rate="10" clip_to_extent="1" force_rhr="0" is_animated="0" name="0" type="marker">
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<layer pass="6" enabled="1" locked="0" class="GeometryGenerator">
<Option type="Map">
<Option name="SymbolType" type="QString" value="Line"/>
<Option name="geometryModifier" type="QString" value="/*
写真と撮影位置を結ぶライン 写真のアンカー位置を@piとし、一旦下に下げてから撮影位置と結ぶ
*/

with_variable('para',map(
 'Number', to_int( coalesce(@PhotoView_Number , 8) *if( @qgis_platform<>'mobile',1,if( @map_extent_width > @map_extent_height ,1, @map_extent_width / @map_extent_height ))) ,
 'TopMargin', to_real(coalesce(@PhotoView_TopMargin ,6.0)+if( @qgis_platform='mobile',3,0))*@map_scale/1000,
 'SideMargin', if( @qgis_platform='mobile',9,1) * @map_scale / 1000,
 'PhotoByGap', 15.0),
with_variable('Gap',(@map_extent_width - @para['SideMargin']*2) /((@para['PhotoByGap']+1)*@para['Number']-1),
with_variable('Extent',intersection( @map_extent , translate( @map_extent ,0,-@para['PhotoByGap']*@Gap*0.800-@para['TopMargin'])),
with_variable('i', --左から何番目か
 array_find(
 array_foreach(
 array_sort(
	 array_foreach( 
 	 array_slice(
 array_sort( 
 array_agg( array( distance( @map_extent_center , $geometry ),$id ,$x ) ,filter:=if( attribute( 'invisible' ),false,true) and within( $geometry , @Extent ))
 )
 ,0,@para['Number']-1)
	, array_reverse(@element))
 )
 ,@element[1])
 ,$id),		-- i の定義終わり
 with_variable('p0',translate(@map_extent_center,@para['SideMargin']+(@para['PhotoByGap']/2)*@Gap-@map_extent_width/2,
 @map_extent_height/2-@para['TopMargin']),
with_variable('pi',
	translate(@p0,(1+@para['PhotoByGap'])*@Gap*@i,0),
 smooth( make_line( @pi, make_point(x(@pi), (y(@pi)+y($geometry))/2 ) , $geometry ) ,5 ) 
))))))
"/>
<Option name="units" type="QString" value="MapUnit"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<symbol alpha="1" frame_rate="10" clip_to_extent="1" force_rhr="0" is_animated="0" name="@0@0" type="line">
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<layer pass="0" enabled="1" locked="0" class="SimpleLine">
<Option type="Map">
<Option name="align_dash_pattern" type="QString" value="0"/>
<Option name="capstyle" type="QString" value="square"/>
<Option name="customdash" type="QString" value="5;2"/>
<Option name="customdash_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="customdash_unit" type="QString" value="MM"/>
<Option name="dash_pattern_offset" type="QString" value="0"/>
<Option name="dash_pattern_offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="dash_pattern_offset_unit" type="QString" value="MM"/>
<Option name="draw_inside_polygon" type="QString" value="0"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="line_color" type="QString" value="15,245,245,255"/>
<Option name="line_style" type="QString" value="solid"/>
<Option name="line_width" type="QString" value="0.2"/>
<Option name="line_width_unit" type="QString" value="MM"/>
<Option name="offset" type="QString" value="0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="ring_filter" type="QString" value="0"/>
<Option name="trim_distance_end" type="QString" value="0"/>
<Option name="trim_distance_end_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="trim_distance_end_unit" type="QString" value="MM"/>
<Option name="trim_distance_start" type="QString" value="0"/>
<Option name="trim_distance_start_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="trim_distance_start_unit" type="QString" value="MM"/>
<Option name="tweak_dash_pattern_on_corners" type="QString" value="0"/>
<Option name="use_custom_dash" type="QString" value="0"/>
<Option name="width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="outlineColor" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="@PhotoView_Color"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</layer>
<layer pass="4" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="15,245,245,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="quarter_circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="solid"/>
<Option name="outline_width" type="QString" value="0.2"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="5"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" + 45"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="enabled" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" is not null"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="fillColor" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="@PhotoView_Color"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="0" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="15,245,245,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="solid"/>
<Option name="outline_width" type="QString" value="0.2"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="2"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
<Option name="enabled" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" is null"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="fillColor" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="@PhotoView_Color"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="5" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="0,0,0,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="no"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="0.6"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="expression" type="QString" value=""/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="7" enabled="1" locked="0" class="GeometryGenerator">
<Option type="Map">
<Option name="SymbolType" type="QString" value="Marker"/>
<Option name="geometryModifier" type="QString" value="/*
ラスタ画像マーカーのアンカー位置、ラベルのアンカー位置 共通
*/
with_variable('para',map(
 'Number', to_int( coalesce(@PhotoView_Number , 8) *if( @qgis_platform<>'mobile',1,if( @map_extent_width > @map_extent_height ,1, @map_extent_width / @map_extent_height ))) ,
 'TopMargin', to_real(coalesce(@PhotoView_TopMargin ,6.0))*@map_scale/1000,
 'SideMargin', if( @qgis_platform='mobile',9,1) * @map_scale / 1000,
 'PhotoByGap', 15.0),
with_variable('Gap',(@map_extent_width - @para['SideMargin']*2) /((@para['PhotoByGap']+1)*@para['Number']-1),
with_variable('Extent',intersection( @map_extent , translate( @map_extent ,0,-@para['PhotoByGap']*@Gap*0.800-@para['TopMargin'])),
with_variable('i', --左から何番目か
 array_find(
 array_foreach(
 array_sort(
	 array_foreach( 
 	 array_slice(
 array_sort( 
 array_agg( array( distance( @map_extent_center , $geometry ),$id ,$x ) ,filter:=if( attribute( 'invisible' ),false,true) and within( $geometry , @Extent ))
 )
 ,0,@para['Number']-1)
	, array_reverse(@element))
 )
 ,@element[1])
 ,$id),		-- i の定義終わり
 with_variable('p0',translate(@map_extent_center,@para['SideMargin']+(@para['PhotoByGap']/2)*@Gap-@map_extent_width/2,
 @map_extent_height/2-@para['TopMargin']),
 translate(@p0,(1+@para['PhotoByGap'])*@Gap*@i,0)
)))))
"/>
<Option name="units" type="QString" value="MapUnit"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<symbol alpha="1" frame_rate="10" clip_to_extent="1" force_rhr="0" is_animated="0" name="@0@4" type="marker">
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<layer pass="0" enabled="1" locked="0" class="RasterMarker">
<Option type="Map">
<Option name="alpha" type="QString" value="1"/>
<Option name="angle" type="QString" value="0"/>
<Option name="fixedAspectRatio" type="QString" value="0"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="imageFile" type="QString" value=""/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="2"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MapUnit"/>
<Option name="vertical_anchor_point" type="QString" value="0"/>
</Option>
<effect enabled="1" type="effectStack">
<effect type="dropShadow">
<Option type="Map">
<Option name="blend_mode" type="QString" value="13"/>
<Option name="blur_level" type="QString" value="2.645"/>
<Option name="blur_unit" type="QString" value="MM"/>
<Option name="blur_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="color" type="QString" value="0,0,0,255"/>
<Option name="draw_mode" type="QString" value="2"/>
<Option name="enabled" type="QString" value="0"/>
<Option name="offset_angle" type="QString" value="135"/>
<Option name="offset_distance" type="QString" value="2"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="offset_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="opacity" type="QString" value="1"/>
</Option>
</effect>
<effect type="outerGlow">
<Option type="Map">
<Option name="blend_mode" type="QString" value="0"/>
<Option name="blur_level" type="QString" value="0.5"/>
<Option name="blur_unit" type="QString" value="MM"/>
<Option name="blur_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="color1" type="QString" value="0,0,255,255"/>
<Option name="color2" type="QString" value="0,255,0,255"/>
<Option name="color_type" type="QString" value="0"/>
<Option name="direction" type="QString" value="ccw"/>
<Option name="discrete" type="QString" value="0"/>
<Option name="draw_mode" type="QString" value="2"/>
<Option name="enabled" type="QString" value="1"/>
<Option name="opacity" type="QString" value="0.5"/>
<Option name="rampType" type="QString" value="gradient"/>
<Option name="single_color" type="QString" value="255,255,255,255"/>
<Option name="spec" type="QString" value="rgb"/>
<Option name="spread" type="QString" value="1"/>
<Option name="spread_unit" type="QString" value="MM"/>
<Option name="spread_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
</Option>
</effect>
<effect type="drawSource">
<Option type="Map">
<Option name="blend_mode" type="QString" value="0"/>
<Option name="draw_mode" type="QString" value="2"/>
<Option name="enabled" type="QString" value="1"/>
<Option name="opacity" type="QString" value="1"/>
</Option>
</effect>
<effect type="innerShadow">
<Option type="Map">
<Option name="blend_mode" type="QString" value="13"/>
<Option name="blur_level" type="QString" value="2.645"/>
<Option name="blur_unit" type="QString" value="MM"/>
<Option name="blur_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="color" type="QString" value="0,0,0,255"/>
<Option name="draw_mode" type="QString" value="2"/>
<Option name="enabled" type="QString" value="0"/>
<Option name="offset_angle" type="QString" value="135"/>
<Option name="offset_distance" type="QString" value="2"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="offset_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="opacity" type="QString" value="1"/>
</Option>
</effect>
<effect type="innerGlow">
<Option type="Map">
<Option name="blend_mode" type="QString" value="0"/>
<Option name="blur_level" type="QString" value="2.645"/>
<Option name="blur_unit" type="QString" value="MM"/>
<Option name="blur_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="color1" type="QString" value="0,0,255,255"/>
<Option name="color2" type="QString" value="0,255,0,255"/>
<Option name="color_type" type="QString" value="0"/>
<Option name="direction" type="QString" value="ccw"/>
<Option name="discrete" type="QString" value="0"/>
<Option name="draw_mode" type="QString" value="2"/>
<Option name="enabled" type="QString" value="0"/>
<Option name="opacity" type="QString" value="0.5"/>
<Option name="rampType" type="QString" value="gradient"/>
<Option name="single_color" type="QString" value="255,255,255,255"/>
<Option name="spec" type="QString" value="rgb"/>
<Option name="spread" type="QString" value="2"/>
<Option name="spread_unit" type="QString" value="MM"/>
<Option name="spread_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
</Option>
</effect>
</effect>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="name" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="/*
写真ファイルへのパス
photo 絶対パス(ジオタグ付き写真の出力
relpath プロジェクトフォルダからの相対パス
*/

replace(
	CASE 
	WHEN file_exists(attribute( 'photo')) THEN attribute( 'photo')
	ELSE 
	 @project_folder || '/' || attribute('relpath')
	END
, '\\','/')"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="width" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="/*
写真の幅 地理単位(m)
 写真数、左右端の余白、写真と写真間隔の比 により写真の幅を決定
 デスクトップ(モバイル以外) 左右端の余白は1mm
 モバイル 左右端の余白は9mm ボタンの幅をとるため、横向きはデスクトップと同じ写真数、縦は縦横比により減らす。
*/

with_variable('para',map(
 'Number', to_int( coalesce(@PhotoView_Number , 8) *if( @qgis_platform<>'mobile',1,if( @map_extent_width > @map_extent_height ,1, @map_extent_width / @map_extent_height ))) ,
 'TopMargin', to_real(coalesce(@PhotoView_TopMargin ,6.0)+if( @qgis_platform='mobile',3,0))*@map_scale/1000,
 'SideMargin', if( @qgis_platform='mobile',9,1) * @map_scale / 1000,
 'PhotoByGap', 15.0),
with_variable('Gap',(@map_extent_width - @para['SideMargin']*2) /((@para['PhotoByGap']+1)*@para['Number']-1),
	@para['PhotoByGap']*@Gap)
)"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</layer>
</symbol>
<symbol alpha="0.6" frame_rate="10" clip_to_extent="1" force_rhr="0" is_animated="0" name="1" type="marker">
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<layer pass="2" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="255,255,255,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="quarter_circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="solid"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="5"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" + 45"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="enabled" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" is not null"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="0" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="255,255,255,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="solid"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="2"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
<Option name="enabled" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" is null"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="3" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="0,0,0,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="no"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="0.75"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol alpha="0.6" frame_rate="10" clip_to_extent="1" force_rhr="0" is_animated="0" name="2" type="marker">
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<layer pass="0" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="179,179,179,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="quarter_circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="solid"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="5"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" + 45"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="enabled" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" is not null"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="0" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="179,179,179,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="solid"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="2"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
<Option name="enabled" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value=""direction" is null"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="1" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="0,0,0,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="no"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="0.75"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</symbols>
</renderer-v2>
<labeling type="rule-based">
<rules key="{59d48c54-df07-4311-86f4-975d0535e57d}">
<rule filter="/*
写真表示地物かの条件判定 シンボロジ、ラベル共通
*/
with_variable('para',map(
 'Number', to_int( coalesce(@PhotoView_Number , 8) *if( @qgis_platform<>'mobile',1,if( @map_extent_width > @map_extent_height ,1, @map_extent_width / @map_extent_height ))) ,
 'TopMargin', to_real(coalesce(@PhotoView_TopMargin ,6.0)+if( @qgis_platform='mobile',3,0))*@map_scale/1000,
 'SideMargin', if( @qgis_platform='mobile',9,1) * @map_scale / 1000,
 'PhotoByGap', 15.0),
with_variable('Gap',(@map_extent_width - @para['SideMargin']*2) /((@para['PhotoByGap']+1)*@para['Number']-1),
with_variable('Extent',
	 intersection( @map_extent , translate( @map_extent ,0,-@para['PhotoByGap']*@Gap*0.800-@para['TopMargin'])),
CASE 
WHEN @map_rotation <> 0 THEN false
WHEN attribute( 'invisible' ) THEN false
WHEN not within( $geometry , @Extent ) THEN false
ELSE
with_variable('DistRank', array_find(
	 array_foreach(
	array_sort( 
		array_agg( array( distance( @map_extent_center , $geometry ),$id ) ,filter:=if( attribute( 'invisible' ),false,true) and within( $geometry , @Extent ))
	),
	@element[1])
	,$id),
@DistRank<@para['Number'])
END
)))" description="Photo" key="{cd18465a-c381-4e8f-b7b9-65dd9951c1cd}">
<settings calloutType="simple">
<text-style fontSizeMapUnitScale="3x:0,0,0,0,0,0" fontWordSpacing="0" forcedBold="0" namedStyle="Regular" fontWeight="50" previewBkgrdColor="255,255,255,255" fontSizeUnit="MapUnit" fontFamily="Arial" multilineHeightUnit="Percentage" capitalization="0" textOrientation="horizontal" fontKerning="1" textColor="0,0,255,255" allowHtml="0" isExpression="1" fontLetterSpacing="0" fontStrikeout="0" fontSize="10" fontItalic="0" useSubstitutions="0" fontUnderline="0" textOpacity="1" legendString="Aa" forcedItalic="0" fieldName="coalesce( attribute( 'label') , attribute('filename') ) " blendMode="0" multilineHeight="1">
<families/>
<text-buffer bufferJoinStyle="128" bufferNoFill="1" bufferSizeUnits="MM" bufferColor="250,250,250,255" bufferBlendMode="0" bufferSize="0.59999999999999998" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferOpacity="1" bufferDraw="1"/>
<text-mask maskEnabled="0" maskSizeMapUnitScale="3x:0,0,0,0,0,0" maskJoinStyle="128" maskType="0" maskSize="0" maskedSymbolLayers="" maskSizeUnits="MM" maskOpacity="1"/>
<background shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeDraw="0" shapeBorderWidthUnit="Point" shapeJoinStyle="64" shapeRadiiX="0" shapeOffsetX="0" shapeSizeType="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeBorderColor="128,128,128,255" shapeOpacity="1" shapeSVGFile="" shapeRadiiY="0" shapeOffsetY="0" shapeRotation="0" shapeSizeUnit="Point" shapeSizeX="0" shapeSizeY="0" shapeType="0" shapeFillColor="255,255,255,255" shapeBorderWidth="0" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeRadiiUnit="Point" shapeOffsetUnit="Point" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeBlendMode="0" shapeRotationType="0">
<symbol alpha="1" frame_rate="10" clip_to_extent="1" force_rhr="0" is_animated="0" name="markerSymbol" type="marker">
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<layer pass="0" enabled="1" locked="0" class="SimpleMarker">
<Option type="Map">
<Option name="angle" type="QString" value="0"/>
<Option name="cap_style" type="QString" value="square"/>
<Option name="color" type="QString" value="243,166,178,255"/>
<Option name="horizontal_anchor_point" type="QString" value="1"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="name" type="QString" value="circle"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="35,35,35,255"/>
<Option name="outline_style" type="QString" value="solid"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="outline_width_unit" type="QString" value="MM"/>
<Option name="scale_method" type="QString" value="diameter"/>
<Option name="size" type="QString" value="2"/>
<Option name="size_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="size_unit" type="QString" value="MM"/>
<Option name="vertical_anchor_point" type="QString" value="1"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol alpha="1" frame_rate="10" clip_to_extent="1" force_rhr="0" is_animated="0" name="fillSymbol" type="fill">
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
<layer pass="0" enabled="1" locked="0" class="SimpleFill">
<Option type="Map">
<Option name="border_width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="color" type="QString" value="255,255,255,255"/>
<Option name="joinstyle" type="QString" value="bevel"/>
<Option name="offset" type="QString" value="0,0"/>
<Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offset_unit" type="QString" value="MM"/>
<Option name="outline_color" type="QString" value="128,128,128,255"/>
<Option name="outline_style" type="QString" value="no"/>
<Option name="outline_width" type="QString" value="0"/>
<Option name="outline_width_unit" type="QString" value="Point"/>
<Option name="style" type="QString" value="solid"/>
</Option>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</background>
<shadow shadowRadiusMapUnitScale="3x:0,0,0,0,0,0" shadowOffsetAngle="135" shadowOffsetGlobal="1" shadowOpacity="0.69999999999999996" shadowOffsetMapUnitScale="3x:0,0,0,0,0,0" shadowColor="0,0,0,255" shadowScale="100" shadowUnder="0" shadowOffsetDist="1" shadowOffsetUnit="MM" shadowRadiusUnit="MM" shadowBlendMode="6" shadowRadiusAlphaOnly="0" shadowDraw="0" shadowRadius="1.5"/>
<dd_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</dd_properties>
<substitutions/>
</text-style>
<text-format reverseDirectionSymbol="0" leftDirectionSymbol="<" formatNumbers="0" decimals="3" plussign="0" wrapChar="" addDirectionSymbol="0" useMaxLineLengthForAutoWrap="1" placeDirectionSymbol="0" rightDirectionSymbol=">" autoWrapLength="0" multilineAlign="3"/>
<placement maxCurvedCharAngleOut="-25" lineAnchorClipping="0" geometryGenerator="/*
ラスタ画像マーカーのアンカー位置、ラベルのアンカー位置 共通
*/
with_variable('para',map(
 'Number', to_int( coalesce(@PhotoView_Number , 8) *if( @qgis_platform<>'mobile',1,if( @map_extent_width > @map_extent_height ,1, @map_extent_width / @map_extent_height ))) ,
 'TopMargin', to_real(coalesce(@PhotoView_TopMargin ,6.0))*@map_scale/1000,
 'SideMargin', if( @qgis_platform='mobile',9,1) * @map_scale / 1000,
 'PhotoByGap', 15.0),
with_variable('Gap',(@map_extent_width - @para['SideMargin']*2) /((@para['PhotoByGap']+1)*@para['Number']-1),
with_variable('Extent',intersection( @map_extent , translate( @map_extent ,0,-@para['PhotoByGap']*@Gap*0.800-@para['TopMargin'])),
with_variable('i', --左から何番目か
 array_find(
 array_foreach(
 array_sort(
	 array_foreach( 
 	 array_slice(
 array_sort( 
 array_agg( array( distance( @map_extent_center , $geometry ),$id ,$x ) ,filter:=if( attribute( 'invisible' ),false,true) and within( $geometry , @Extent ))
 )
 ,0,@para['Number']-1)
	, array_reverse(@element))
 )
 ,@element[1])
 ,$id),		-- i の定義終わり
 with_variable('p0',translate(@map_extent_center,@para['SideMargin']+(@para['PhotoByGap']/2)*@Gap-@map_extent_width/2,
 @map_extent_height/2-@para['TopMargin']),
 translate(@p0,(1+@para['PhotoByGap'])*@Gap*@i,0)
)))))
" repeatDistanceMapUnitScale="3x:0,0,0,0,0,0" lineAnchorTextPoint="CenterOfText" yOffset="0" fitInPolygonOnly="0" overrunDistance="0" distMapUnitScale="3x:0,0,0,0,0,0" overrunDistanceUnit="MM" predefinedPositionOrder="TR,TL,BR,BL,R,L,TSR,BSR" overlapHandling="PreventOverlap" rotationAngle="0" distUnits="MM" centroidInside="0" quadOffset="1" centroidWhole="0" lineAnchorType="0" polygonPlacementFlags="2" rotationUnit="AngleDegrees" dist="0" maxCurvedCharAngleIn="25" offsetUnits="MM" repeatDistance="0" repeatDistanceUnits="MM" placement="1" layerType="PointGeometry" xOffset="0" allowDegraded="0" placementFlags="10" overrunDistanceMapUnitScale="3x:0,0,0,0,0,0" labelOffsetMapUnitScale="3x:0,0,0,0,0,0" geometryGeneratorEnabled="1" geometryGeneratorType="PointGeometry" lineAnchorPercent="0.5" preserveRotation="1" priority="5" offsetType="1"/>
<rendering minFeatureSize="0" labelPerPart="0" mergeLines="0" fontLimitPixelSize="0" scaleVisibility="0" obstacleType="1" scaleMin="0" obstacleFactor="1" fontMaxPixelSize="10000" unplacedVisibility="0" limitNumLabels="0" drawLabels="1" obstacle="1" zIndex="0" maxNumLabels="2000" upsidedownLabels="0" fontMinPixelSize="3" scaleMax="0"/>
<dd_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="Color" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="darker( @PhotoView_Color,200)"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="Size" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="/*
ラベルの高さ
文字数が多い場合、縮小する。
プロポーショナルフォントは半角の幅が不定なので、幅を@SingleByteCaracterWidthで仮定する。
*/

with_variable('para',map(
 'Number', to_int( coalesce(@PhotoView_Number , 8) *if( @qgis_platform<>'mobile',1,if( @map_extent_width > @map_extent_height ,1, @map_extent_width / @map_extent_height ))) ,
 'TopMargin', to_real(coalesce(@PhotoView_TopMargin ,6.0))*@map_scale/1000,
 'SideMargin', if( @qgis_platform='mobile',9,1) * @map_scale / 1000,
 'PhotoByGap', 15.0),
with_variable('Gap',(@map_extent_width - @para['SideMargin']*2) /((@para['PhotoByGap']+1)*@para['Number']-1),
with_variable('SingleByteCaracterWidth',to_real(coalesce(@PhotoView_SingleByteCaracterWidth ,0.7)),
with_variable('LabelSize', @para['TopMargin']-if(@qgis_platform='mobile',4,1)*@map_scale/1000,
with_variable('PhotoWidth',@para['PhotoByGap']*@Gap,
with_variable('StrLen',
 eval( array_to_string(
 array_foreach(
 array_remove_all( string_to_array(coalesce( attribute( 'label') , attribute('filename') ) ,''),''),
 if(@element ~ '[ -~]',@SingleByteCaracterWidth,1))
,'+'))
,
if(@PhotoWidth>@LabelSize*@StrLen,
 @LabelSize,@PhotoWidth/@StrLen)
))))))"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</dd_properties>
<callout type="simple">
<Option type="Map">
<Option name="anchorPoint" type="QString" value="pole_of_inaccessibility"/>
<Option name="blendMode" type="int" value="0"/>
<Option name="ddProperties" type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
<Option name="drawToAllParts" type="bool" value="false"/>
<Option name="enabled" type="QString" value="0"/>
<Option name="labelAnchorPoint" type="QString" value="point_on_exterior"/>
<Option name="lineSymbol" type="QString" value="<symbol alpha="1" frame_rate="10" clip_to_extent="1" force_rhr="0" is_animated="0" name="symbol" type="line"><data_defined_properties><Option type="Map"><Option name="name" type="QString" value=""/><Option name="properties"/><Option name="type" type="QString" value="collection"/></Option></data_defined_properties><layer pass="0" enabled="1" locked="0" class="SimpleLine"><Option type="Map"><Option name="align_dash_pattern" type="QString" value="0"/><Option name="capstyle" type="QString" value="square"/><Option name="customdash" type="QString" value="5;2"/><Option name="customdash_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/><Option name="customdash_unit" type="QString" value="MM"/><Option name="dash_pattern_offset" type="QString" value="0"/><Option name="dash_pattern_offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/><Option name="dash_pattern_offset_unit" type="QString" value="MM"/><Option name="draw_inside_polygon" type="QString" value="0"/><Option name="joinstyle" type="QString" value="bevel"/><Option name="line_color" type="QString" value="60,60,60,255"/><Option name="line_style" type="QString" value="solid"/><Option name="line_width" type="QString" value="0.3"/><Option name="line_width_unit" type="QString" value="MM"/><Option name="offset" type="QString" value="0"/><Option name="offset_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/><Option name="offset_unit" type="QString" value="MM"/><Option name="ring_filter" type="QString" value="0"/><Option name="trim_distance_end" type="QString" value="0"/><Option name="trim_distance_end_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/><Option name="trim_distance_end_unit" type="QString" value="MM"/><Option name="trim_distance_start" type="QString" value="0"/><Option name="trim_distance_start_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/><Option name="trim_distance_start_unit" type="QString" value="MM"/><Option name="tweak_dash_pattern_on_corners" type="QString" value="0"/><Option name="use_custom_dash" type="QString" value="0"/><Option name="width_map_unit_scale" type="QString" value="3x:0,0,0,0,0,0"/></Option><data_defined_properties><Option type="Map"><Option name="name" type="QString" value=""/><Option name="properties"/><Option name="type" type="QString" value="collection"/></Option></data_defined_properties></layer></symbol>"/>
<Option name="minLength" type="double" value="0"/>
<Option name="minLengthMapUnitScale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="minLengthUnit" type="QString" value="MM"/>
<Option name="offsetFromAnchor" type="double" value="0"/>
<Option name="offsetFromAnchorMapUnitScale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offsetFromAnchorUnit" type="QString" value="MM"/>
<Option name="offsetFromLabel" type="double" value="0"/>
<Option name="offsetFromLabelMapUnitScale" type="QString" value="3x:0,0,0,0,0,0"/>
<Option name="offsetFromLabelUnit" type="QString" value="MM"/>
</Option>
</callout>
</settings>
</rule>
</rules>
</labeling>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<fieldConfiguration>
<field name="fid" configurationFlags="None">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="relpath" configurationFlags="None">
<editWidget type="ExternalResource">
<config>
<Option type="Map">
<Option name="DocumentViewer" type="int" value="1"/>
<Option name="DocumentViewerHeight" type="int" value="0"/>
<Option name="DocumentViewerWidth" type="int" value="0"/>
<Option name="FileWidget" type="bool" value="true"/>
<Option name="FileWidgetButton" type="bool" value="true"/>
<Option name="FileWidgetFilter" type="QString" value=""/>
<Option name="PropertyCollection" type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="invalid"/>
<Option name="type" type="QString" value="collection"/>
</Option>
<Option name="RelativeStorage" type="int" value="1"/>
<Option name="StorageAuthConfigId" type="QString" value=""/>
<Option name="StorageMode" type="int" value="0"/>
<Option name="StorageType" type="QString" value=""/>
</Option>
</config>
</editWidget>
</field>
<field name="label" configurationFlags="None">
<editWidget type="TextEdit">
<config>
<Option type="Map">
<Option name="IsMultiline" type="bool" value="false"/>
<Option name="UseHtml" type="bool" value="false"/>
</Option>
</config>
</editWidget>
</field>
<field name="invisible" configurationFlags="None">
<editWidget type="CheckBox">
<config>
<Option type="Map">
<Option name="CheckedState" type="QString" value=""/>
<Option name="TextDisplayMethod" type="int" value="0"/>
<Option name="UncheckedState" type="QString" value=""/>
</Option>
</config>
</editWidget>
</field>
<field name="timestamp" configurationFlags="None">
<editWidget type="DateTime">
<config>
<Option type="Map">
<Option name="allow_null" type="bool" value="true"/>
<Option name="calendar_popup" type="bool" value="true"/>
<Option name="display_format" type="QString" value="yyyy/MM/dd HH:mm:ss"/>
<Option name="field_format" type="QString" value="yyyy/MM/dd HH:mm:ss"/>
<Option name="field_iso_format" type="bool" value="false"/>
</Option>
</config>
</editWidget>
</field>
<field name="direction" configurationFlags="None">
<editWidget type="TextEdit">
<config>
<Option type="Map">
<Option name="IsMultiline" type="bool" value="false"/>
<Option name="UseHtml" type="bool" value="false"/>
</Option>
</config>
</editWidget>
</field>
<field name="photo" configurationFlags="None">
<editWidget type="ExternalResource">
<config>
<Option type="Map">
<Option name="DocumentViewer" type="int" value="1"/>
<Option name="DocumentViewerHeight" type="int" value="0"/>
<Option name="DocumentViewerWidth" type="int" value="0"/>
<Option name="FileWidget" type="bool" value="true"/>
<Option name="FileWidgetButton" type="bool" value="true"/>
<Option name="FileWidgetFilter" type="QString" value=""/>
<Option name="PropertyCollection" type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="invalid"/>
<Option name="type" type="QString" value="collection"/>
</Option>
<Option name="RelativeStorage" type="int" value="0"/>
<Option name="StorageAuthConfigId" type="QString" value=""/>
<Option name="StorageMode" type="int" value="0"/>
<Option name="StorageType" type="QString" value=""/>
</Option>
</config>
</editWidget>
</field>
<field name="filename" configurationFlags="None">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="directory" configurationFlags="None">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="altitude" configurationFlags="None">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="rotation" configurationFlags="None">
<editWidget type="Range">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="longitude" configurationFlags="None">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="latitude" configurationFlags="None">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
</fieldConfiguration>
<aliases>
<alias name="" index="0" field="fid"/>
<alias name="" index="1" field="relpath"/>
<alias name="" index="2" field="label"/>
<alias name="" index="3" field="invisible"/>
<alias name="" index="4" field="timestamp"/>
<alias name="" index="5" field="direction"/>
<alias name="" index="6" field="photo"/>
<alias name="" index="7" field="filename"/>
<alias name="" index="8" field="directory"/>
<alias name="" index="9" field="altitude"/>
<alias name="" index="10" field="rotation"/>
<alias name="" index="11" field="longitude"/>
<alias name="" index="12" field="latitude"/>
</aliases>
<defaults>
<default applyOnUpdate="0" field="fid" expression=""/>
<default applyOnUpdate="0" field="relpath" expression=""/>
<default applyOnUpdate="0" field="label" expression=""/>
<default applyOnUpdate="0" field="invisible" expression=""/>
<default applyOnUpdate="0" field="timestamp" expression=""/>
<default applyOnUpdate="0" field="direction" expression=""/>
<default applyOnUpdate="0" field="photo" expression=""/>
<default applyOnUpdate="0" field="filename" expression=""/>
<default applyOnUpdate="0" field="directory" expression=""/>
<default applyOnUpdate="0" field="altitude" expression=""/>
<default applyOnUpdate="0" field="rotation" expression=""/>
<default applyOnUpdate="0" field="longitude" expression=""/>
<default applyOnUpdate="0" field="latitude" expression=""/>
</defaults>
<constraints>
<constraint exp_strength="0" constraints="3" notnull_strength="1" unique_strength="1" field="fid"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="relpath"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="label"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="invisible"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="timestamp"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="direction"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="photo"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="filename"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="directory"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="altitude"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="rotation"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="longitude"/>
<constraint exp_strength="0" constraints="0" notnull_strength="0" unique_strength="0" field="latitude"/>
</constraints>
<constraintExpressions>
<constraint desc="" field="fid" exp=""/>
<constraint desc="" field="relpath" exp=""/>
<constraint desc="" field="label" exp=""/>
<constraint desc="" field="invisible" exp=""/>
<constraint desc="" field="timestamp" exp=""/>
<constraint desc="" field="direction" exp=""/>
<constraint desc="" field="photo" exp=""/>
<constraint desc="" field="filename" exp=""/>
<constraint desc="" field="directory" exp=""/>
<constraint desc="" field="altitude" exp=""/>
<constraint desc="" field="rotation" exp=""/>
<constraint desc="" field="longitude" exp=""/>
<constraint desc="" field="latitude" exp=""/>
</constraintExpressions>
<expressionfields/>
<attributeactions>
<defaultAction key="Canvas" value="{f3d09ced-e2ce-4a35-956d-c1cb9c8ff1b8}"/>
<actionsetting notificationMessage="" name="open" id="{f3d09ced-e2ce-4a35-956d-c1cb9c8ff1b8}" shortTitle="" icon="" isEnabledOnlyWhenEditable="0" action="[%replace(
 coalesce( attribute( 'photo'),
 file_path( layer_property( @layer ,'path')) || '/' || attribute('relpath')
 )
, '\\','/')%]" type="5" capture="0">
<actionScope id="Field"/>
<actionScope id="Layer"/>
<actionScope id="Feature"/>
<actionScope id="Canvas"/>
</actionsetting>
</attributeactions>
<attributetableconfig actionWidgetStyle="dropDown" sortExpression="" sortOrder="0">
<columns>
<column hidden="0" name="filename" type="field" width="-1"/>
<column hidden="0" name="directory" type="field" width="-1"/>
<column hidden="0" name="altitude" type="field" width="-1"/>
<column hidden="0" name="direction" type="field" width="-1"/>
<column hidden="0" name="rotation" type="field" width="-1"/>
<column hidden="0" name="longitude" type="field" width="-1"/>
<column hidden="0" name="latitude" type="field" width="-1"/>
<column hidden="0" name="timestamp" type="field" width="-1"/>
<column hidden="0" name="invisible" type="field" width="-1"/>
<column hidden="0" name="label" type="field" width="-1"/>
<column hidden="0" name="relpath" type="field" width="231"/>
<column hidden="0" name="photo" type="field" width="-1"/>
<column hidden="0" name="fid" type="field" width="-1"/>
<column hidden="1" type="actions" width="-1"/>
</columns>
</attributetableconfig>
<conditionalstyles>
<rowstyles/>
<fieldstyles/>
</conditionalstyles>
<storedexpressions/>
<editform tolerant="1"></editform>
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
"""