grids
This commit is contained in:
parent
ad0217fec1
commit
cbe6b70c00
@ -1,7 +1,10 @@
|
|||||||
#uzupis
|
#uzupis
|
||||||
#BOUNDS = xmin=582700 ymin=6060750 xmax=584830 ymax=6062750
|
#BOUNDS = xmin=582700 ymin=6060750 xmax=584830 ymax=6062750
|
||||||
#krekenava
|
#krekenava
|
||||||
BOUNDS = xmin=493674 ymin=6146103 xmax=518869 ymax=6171741
|
#BOUNDS = xmin=493674 ymin=6146103 xmax=518869 ymax=6171741
|
||||||
|
BOUNDS = xmin=504440 ymin=6154741 xmax=507410 ymax=6158941
|
||||||
|
#OUTSIZE = $(shell awk $(addprefix -v ,$(BOUNDS)) 'BEGIN{print ymax-ymin" "xmax-xmin}' /dev/null)
|
||||||
|
OUTSIZE = $(shell awk $(addprefix -v ,$(BOUNDS)) 'BEGIN{print int((ymax-ymin)/8)" "int((xmax-xmin)/8)}' /dev/null)
|
||||||
XYZ = $(patsubst %.zip,%.xyz,$(wildcard 6*.zip))
|
XYZ = $(patsubst %.zip,%.xyz,$(wildcard 6*.zip))
|
||||||
SORT = sort -n -k2 -k1 -t,
|
SORT = sort -n -k2 -k1 -t,
|
||||||
|
|
||||||
@ -28,7 +31,7 @@ contour_%.gpkg: all.tif
|
|||||||
gdal_contour -nln $(basename $@) -i $(subst _,.,$*) -a z $^ $@
|
gdal_contour -nln $(basename $@) -i $(subst _,.,$*) -a z $^ $@
|
||||||
|
|
||||||
all-grid.tif: all.vrt all.csv
|
all-grid.tif: all.vrt all.csv
|
||||||
gdal_grid $< $@ -ot Float32
|
gdal_grid $< $@ -ot Float32 -outsize $(OUTSIZE)
|
||||||
|
|
||||||
all.tif: all-grid.tif
|
all.tif: all-grid.tif
|
||||||
gdal_translate $< $@ \
|
gdal_translate $< $@ \
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#uzupis
|
#uzupis
|
||||||
#BOUNDS = xmin=582700 ymin=6060750 xmax=584830 ymax=6062750
|
BOUNDS = xmin=582700 ymin=6060750 xmax=584830 ymax=6062750
|
||||||
#krekenava
|
XYZ = $(patsubst %.zip,%.xyz,$(wildcard 6*.zip))
|
||||||
BOUNDS = xmin=493674 ymin=6146103 xmax=518869 ymax=6171741
|
|
||||||
XYZ = $(patsubst %.zip,%.xyz,$(wildcard *.zip))
|
|
||||||
SORT = sort -n -k2 -k1 -t,
|
SORT = sort -n -k2 -k1 -t,
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
@ -27,19 +25,19 @@ db/contour_%: contour_%.gpkg db/.ready
|
|||||||
contour_%.gpkg: all.tif
|
contour_%.gpkg: all.tif
|
||||||
gdal_contour -nln $(basename $@) -i $(subst _,.,$*) -a z $^ $@
|
gdal_contour -nln $(basename $@) -i $(subst _,.,$*) -a z $^ $@
|
||||||
|
|
||||||
all.tif: all.xyz
|
all.tif: all.csv
|
||||||
gdal_translate $< $@ \
|
gdal_translate $< $@ \
|
||||||
-ot Float32 -a_srs EPSG:3346 \
|
-ot Float32 -a_srs EPSG:3346 \
|
||||||
-co COMPRESS=DEFLATE -co PREDICTOR=2
|
-co COMPRESS=DEFLATE -co PREDICTOR=2
|
||||||
|
|
||||||
.INTERMEDIATE: all.xyz
|
.INTERMEDIATE: all.csv
|
||||||
all.xyz: $(XYZ)
|
all.csv: $(XYZ)
|
||||||
$(SORT) -m $^ > $@
|
$(SORT) -m $^ > $@
|
||||||
|
|
||||||
.INTERMEDIATE: $(XYZ)
|
.INTERMEDIATE: $(XYZ)
|
||||||
%.xyz: %.zip
|
%.xyz: %.zip
|
||||||
unzip -qq -c $< $@ | \
|
unzip -qq -c $< $@ | \
|
||||||
./clip-2009.awk $(addprefix -v ,$(BOUNDS)) | \
|
./clip-2017.awk $(addprefix -v ,$(BOUNDS)) | \
|
||||||
$(SORT) > $@
|
$(SORT) > $@
|
||||||
|
|
||||||
db/.ready: managedb
|
db/.ready: managedb
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<OGRVRTDataSource>
|
<OGRVRTDataSource>
|
||||||
<OGRVRTLayer name="all">
|
<OGRVRTLayer name="all">
|
||||||
<LayerSRS>EPSG:3346</LayerSRS>
|
<LayerSRS>EPSG:3346</LayerSRS>
|
||||||
<SrcDataSource>all-small.csv</SrcDataSource>
|
<SrcDataSource>all.csv</SrcDataSource>
|
||||||
<GeometryType>wkbPoint</GeometryType>
|
<GeometryType>wkbPoint</GeometryType>
|
||||||
<GeometryField encoding="PointFromColumns" x="field_1" y="field_2" z="field_3"/>
|
<GeometryField encoding="PointFromColumns" x="field_1" y="field_2" z="field_3"/>
|
||||||
</OGRVRTLayer>
|
</OGRVRTLayer>
|
||||||
|
Loading…
Reference in New Issue
Block a user