Skip to content

Instantly share code, notes, and snippets.

@aborruso

aborruso/00_README.md

Last active Oct 4, 2020
Embed
What would you like to do?
#!/bin/bash
rm ./outputCatasto.txt
while IFS=$'\t' read -r X Y; do
minX=$(bc <<< "$X - 1")
minY=$(bc <<< "$Y - 1")
maxX=$(bc <<< "$X + 1")
maxY=$(bc <<< "$Y + 1")
curl -sKL "https://wms.cartografia.agenziaentrate.gov.it/inspire/wms/ows01.php?REQUEST=GetFeatureInfo&SERVICE=WMS&SRS=EPSG:3045&STYLES=&VERSION=1.1&FORMAT=image/png&BBOX=$minX,$minY,$maxX,$maxY&HEIGHT=9&WIDTH=9&LAYERS=CP.CadastralParcel&QUERY_LAYERS=CP.CadastralParcel&INFO_FORMAT=text/html&X=5&Y=5" | grep -oE 'IT.+[0-9]' >>./outputCatasto.txt
done <./input.tsv
355461.5 4222490.7
356257.6 4222742.7
356259.7 4222236.7
<GDAL_WMS>
<Service name="WMS">
<Version>1.1.1</Version>
<ServerUrl>https://wms.cartografia.agenziaentrate.gov.it/inspire/wms/ows01.php?language=ita&amp;SERVICE=WMS</ServerUrl>
<Layers>CP.CadastralParcel</Layers>
<SRS>EPSG:6706</SRS>
<ImageFormat>image/png</ImageFormat>
<Transparent>FALSE</Transparent>
<BBoxOrder>xyXY</BBoxOrder>
</Service>
<DataWindow>
<UpperLeftX>2</UpperLeftX>
<UpperLeftY>48</UpperLeftY>
<LowerRightX>19</LowerRightX>
<LowerRightY>33</LowerRightY>
<SizeX>1073741824</SizeX>
<SizeY>947419256</SizeY>
</DataWindow>
<BandsCount>3</BandsCount>
<BlockSizeX>1024</BlockSizeX>
<BlockSizeY>1024</BlockSizeY>
<OverviewCount>20</OverviewCount>
</GDAL_WMS>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.