blob: af2c60b88afaff8f5a4a6fa1120e65f63d83d206 (
plain)
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
|
DATAPATH = $(top_srcdir)/data
pkgdata_DATA = proj.ini GL27 nad.lst nad27 nad83 world other.extra \
CH \
ITRF2000 ITRF2008 ITRF2014 proj.db \
projjson.schema.json \
deformation_model.schema.json \
triangulation.schema.json
SQL_ORDERED_LIST = sql/begin.sql \
sql/proj_db_table_defs.sql \
sql/conversion_triggers.sql \
sql/metadata.sql \
sql/unit_of_measure.sql \
sql/extent.sql \
sql/scope.sql \
sql/coordinate_system.sql \
sql/axis.sql \
sql/ellipsoid.sql \
sql/prime_meridian.sql \
sql/geodetic_datum.sql \
sql/geodetic_datum_ensemble_member.sql \
sql/vertical_datum.sql \
sql/vertical_datum_ensemble_member.sql \
sql/conversion.sql \
sql/geodetic_crs.sql \
sql/projected_crs.sql \
sql/vertical_crs.sql \
sql/compound_crs.sql \
sql/helmert_transformation.sql \
sql/grid_transformation.sql \
sql/grid_transformation_custom.sql \
sql/other_transformation.sql \
sql/concatenated_operation.sql \
sql/concatenated_operation_step.sql \
sql/usage.sql \
sql/alias_name.sql \
sql/supersession.sql \
sql/deprecation.sql \
sql/esri.sql \
sql/ignf.sql \
sql/grid_alternatives.sql \
sql/grid_alternatives_generated_noaa.sql \
sql/customizations.sql \
sql/commit.sql
EXTRA_DIST = proj.ini GL27 nad.lst nad27 nad83 \
world other.extra \
CH \
ITRF2000 ITRF2008 ITRF2014 \
projjson.schema.json \
deformation_model.schema.json \
triangulation.schema.json \
CMakeLists.txt \
tests/test_nodata.gtx \
tests/test_vgrid_bigendian_bigtiff.tif \
tests/test_vgrid_bigendian.tif \
tests/test_vgrid_bigtiff.tif \
tests/test_vgrid_bottomup_with_matrix.tif \
tests/test_vgrid_bottomup_with_scale.tif \
tests/test_vgrid_deflate_floatingpointpredictor.tif \
tests/test_vgrid_deflate.tif \
tests/test_vgrid_float64.tif \
tests/test_vgrid_in_second_channel.tif \
tests/test_vgrid_int16.tif \
tests/test_vgrid_int32.tif \
tests/test_vgrid_uint32.tif \
tests/test_vgrid_invalid_channel_type.tif \
tests/test_vgrid_nodata.tif \
tests/test_vgrid_pixelisarea.tif \
tests/test_vgrid_pixelispoint.tif \
tests/test_vgrid_uint16.tif \
tests/test_vgrid_uint16_with_scale_offset.tif \
tests/test_vgrid_unsupported_byte.tif \
tests/test_vgrid_with_overview.tif \
tests/test_vgrid_with_subgrid.tif \
tests/test_hgrid.tif \
tests/test_hgrid_separate.tif \
tests/test_hgrid_tiled.tif \
tests/test_hgrid_tiled_separate.tif \
tests/test_hgrid_strip.tif \
tests/test_hgrid_positive_west.tif \
tests/test_hgrid_lon_shift_first.tif \
tests/test_hgrid_radian.tif \
tests/test_hgrid_degree.tif \
tests/test_hgrid_with_overview.tif \
tests/test_hgrid_extra_ifd_with_other_info.tif \
tests/test_hgrid_with_subgrid.tif \
tests/test_hgrid_with_subgrid_no_grid_name.tif \
tests/subset_of_gr3df97a.tif \
tests/egm96_15_uncompressed_truncated.tif \
tests/test_vgrid_single_strip_truncated.tif \
tests/nkgrf03vel_realigned_extract.tif \
tests/nkgrf03vel_realigned_xy_extract.ct2 \
tests/nkgrf03vel_realigned_z_extract.gtx \
tests/test_hgrid_with_two_level_of_subgrids_no_grid_name.tif \
tests/us_noaa_geoid06_ak_subset_at_antimeridian.tif \
tests/test_hgrid_little_endian.gsb \
tests/test_hgrid_big_endian.gsb \
tests/test_3d_grid_projected.tif \
tests/BETA2007.gsb \
tests/MD \
tests/alaska \
tests/conus \
tests/egm96_15_downsampled.gtx \
tests/ntv1_can.dat \
tests/ntv2_0_downsampled.gsb \
tests/ntf_r93.gsb \
tests/simple_model_degree_3d_grid.tif \
tests/simple_model_degree_horizontal.json \
tests/simple_model_degree_3d.json \
tests/simple_model_metre_3d_grid.tif \
tests/simple_model_metre_horizontal.json \
tests/simple_model_metre_3d.json \
tests/simple_model_metre_3d_geocentric.json \
tests/simple_model_metre_vertical_grid.tif \
tests/simple_model_metre_vertical.json \
tests/simple_model_polar.json \
tests/simple_model_polar.tif \
tests/simple_model_wrap_east.json \
tests/simple_model_wrap_east.tif \
tests/simple_model_wrap_west.json \
tests/simple_model_wrap_west.tif \
tests/simple_model_projected.json \
tests/tinshift_crs_implicit.json \
tests/tinshift_simplified_kkj_etrs.json \
tests/tinshift_simplified_n60_n2000.json \
generate_all_sql_in.cmake sql_filelist.cmake \
$(SQL_ORDERED_LIST)
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@for gridfile in $(DATAPATH)/*.gsb $(DATAPATH)/*.gtx $(DATAPATH)/ntv1_can.dat dummy \
$(DATAPATH)/alaska $(DATAPATH)/conus $(DATAPATH)/hawaii \
$(DATAPATH)/prvi $(DATAPATH)/stgeorge $(DATAPATH)/stlrnc $(DATAPATH)/stpaul \
$(DATAPATH)/FL $(DATAPATH)/MD $(DATAPATH)/TN $(DATAPATH)/WI $(DATAPATH)/WO; do \
if test "$$gridfile" != "dummy" -a -f "$$gridfile" ; then \
echo $(INSTALL_DATA) $$gridfile $(DESTDIR)$(pkgdatadir)/`basename $$gridfile`; \
$(INSTALL_DATA) $$gridfile $(DESTDIR)$(pkgdatadir)/`basename $$gridfile`; \
fi; \
done
# head -c1 not handled on Solaris
proj.db: $(DATAPATH)/sql/*.sql
@echo "Make proj.db"
$(RM) proj.db
@export SQL_EXPANDED_LIST=""; \
for x in $(SQL_ORDERED_LIST); do \
export SQL_EXPANDED_LIST="$${SQL_EXPANDED_LIST} $(DATAPATH)/$$x"; \
done; \
if test "x$(PROJ_DB_CACHE_DIR)" != "x" -a -x "$$(command -v md5sum)" -a -f "$(PROJ_DB_CACHE_DIR)/proj.db" -a -f "$(PROJ_DB_CACHE_DIR)/proj.db.sql.md5" ; then \
cat $${SQL_EXPANDED_LIST} | md5sum | diff - "$(PROJ_DB_CACHE_DIR)/proj.db.sql.md5" > /dev/null \
&& (echo "Reusing cached proj.db"; cp "$(PROJ_DB_CACHE_DIR)/proj.db" proj.db); \
fi; \
if test ! -f proj.db ; then \
cat $${SQL_EXPANDED_LIST} | sqlite3 proj.db; \
fi; \
if [ $$? -ne 0 ] ; then \
echo "Build of proj.db failed"; \
$(RM) proj.db; \
exit 1; \
fi; \
echo "" | head -c1; \
if [ $$? -eq 0 ] ; then \
echo "Running foreign_key_check"; \
if [ $$(echo "pragma foreign_key_check;" | sqlite3 proj.db | head -c1 | wc -c) -ne 0 ]; then \
echo "Foreign key check failed"; \
$(RM) proj.db; \
exit 1; \
else \
if test "x$(PROJ_DB_CACHE_DIR)" != "x" -a -x "$$(command -v md5sum)" ; then \
mkdir -p "$(PROJ_DB_CACHE_DIR)"; \
cat $${SQL_EXPANDED_LIST} | md5sum > "$(PROJ_DB_CACHE_DIR)/proj.db.sql.md5"; \
cp proj.db "$(PROJ_DB_CACHE_DIR)"; \
fi \
fi \
fi
# For out-of-tree builds, link all file of the source data dir to the generated data
# Also link select resource files in a for_tests subdirectory so that we are not
# influenced by the presence of other grids
# egm96_15_downsampled.gtx created with
# gdal_translate proj-datumgrid/egm96_15.gtx egm96_15_downsampled.gtx -of GTX -outsize 25% 25% -r average
# ntv2_0_downsampled.gsb created with:
# gdal_translate NTv2:0:/home/even/proj/proj-datumgrid/north-america/ntv2_0.gsb /tmp/ntv2_0_downsampled.gsb -of NTv2 -outsize 10% 10%
# gdal_translate NTv2:1:/home/even/proj/proj-datumgrid/north-america/ntv2_0.gsb /tmp/ntv2_0_downsampled.gsb -of NTv2 -outsize 10% 10% -co append_subdataset=yes
# gdal_translate NTv2:2:/home/even/proj/proj-datumgrid/north-america/ntv2_0.gsb /tmp/ntv2_0_downsampled.gsb -of NTv2 -outsize 10% 10% -co append_subdataset=yes
# gdal_translate NTv2:3:/home/even/proj/proj-datumgrid/north-america/ntv2_0.gsb /tmp/ntv2_0_downsampled.gsb -of NTv2 -outsize 10% 10% -co append_subdataset=yes
# gdal_translate NTv2:99:/home/even/proj/proj-datumgrid/north-america/ntv2_0.gsb /tmp/ntv2_0_downsampled.gsb -of NTv2 -co append_subdataset=yes
# gdal_translate NTv2:44:/home/even/proj/proj-datumgrid/north-america/ntv2_0.gsb /tmp/ntv2_0_downsampled.gsb -of NTv2 -co append_subdataset=yes
# gdal_translate NTv2:4:/home/even/proj/proj-datumgrid/north-america/ntv2_0.gsb /tmp/ntv2_0_downsampled.gsb -of NTv2 -co append_subdataset=yes
check-local:
@if [ ! -f GL27 ]; then \
for x in $(DATAPATH)/*; do \
ln -sf $$x .; \
done \
fi; \
rm -rf for_tests; \
mkdir for_tests; \
for x in $(DATAPATH)/GL27 \
$(DATAPATH)/nad27 \
$(DATAPATH)/nad83 \
$(DATAPATH)/tests/ntv1_can.dat \
$(DATAPATH)/tests/MD \
$(DATAPATH)/tests/ntf_r93.gsb \
$(DATAPATH)/tests/conus \
$(DATAPATH)/tests/alaska \
$(DATAPATH)/ITRF2000 \
$(DATAPATH)/tests/BETA2007.gsb; \
do \
if test -f "$$x" ; then \
ln -sf "../$$x" for_tests; \
else \
echo "ERROR: grid $$x missing: some tests will be skipped"; \
exit 1; \
fi \
done; \
ln -sf ../$(DATAPATH)/tests for_tests; \
ln -sf ../$(DATAPATH)/tests/ntv2_0_downsampled.gsb for_tests/ntv2_0.gsb; \
ln -sf ../$(DATAPATH)/tests/egm96_15_downsampled.gtx for_tests/egm96_15.gtx; \
ln -sf ../$(DATAPATH)/proj.ini for_tests; \
ln -sf ../proj.db for_tests
clean-local:
$(RM) proj.db
$(RM) -rf for_tests
|