Skip to content

Commit

Permalink
Shorten long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanb committed Mar 26, 2022
1 parent c475cd5 commit bf3be18
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions split.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ function split() {
BASENAME=$(basename "$shpFile" .shp)
echo "${descriptionCollection}: Extracting ${enota} from ${shp}..."
mkdir -p "data/${shp}"
SHAPE_ENCODING=CP1250 ogr2ogr -t_srs "EPSG:4326" -f "CSV" "data/${shp}/${BASENAME}_${enota}.csv" "${DIRNAME}" -sql "SELECT * FROM ${BASENAME} WHERE ENOTA='${enota}' ORDER BY ${BASENAME}_MID" -dialect sqlite -lco WRITE_BOM=YES -lco STRING_QUOTING=IF_NEEDED
SHAPE_ENCODING=CP1250 ogr2ogr -t_srs "EPSG:4326" \
-f "CSV" "data/${shp}/${BASENAME}_${enota}.csv" "${DIRNAME}" \
-sql "SELECT * FROM ${BASENAME} WHERE ENOTA='${enota}' ORDER BY ${BASENAME}_MID" -dialect sqlite \
-lco WRITE_BOM=YES -lco STRING_QUOTING=IF_NEEDED

SHAPE_ENCODING=CP1250 ogr2ogr -t_srs "EPSG:4326" \
-f "GeoJSON" "data/${shp}/${BASENAME}_${enota}.geojson" "${DIRNAME}" \
-sql "SELECT * FROM ${BASENAME} WHERE ENOTA='${enota}' ORDER BY ${BASENAME}_MID" -dialect sqlite \
-lco RFC7946=YES -lco WRITE_BBOX=YES -mapFieldType Date=String \
-nln "${BASENAME}_${enota}" -lco DESCRIPTION="${descriptionCollection}"

SHAPE_ENCODING=CP1250 ogr2ogr -t_srs "EPSG:4326" -f "GeoJSON" "data/${shp}/${BASENAME}_${enota}.geojson" "${DIRNAME}" -sql "SELECT * FROM ${BASENAME} WHERE ENOTA='${enota}' ORDER BY ${BASENAME}_MID" -dialect sqlite -lco RFC7946=YES -lco WRITE_BBOX=YES -mapFieldType Date=String -nln "${BASENAME}_${enota}" -lco DESCRIPTION="${descriptionCollection}"
}

split VDV VE "RHLFvmF2bm96Ym9yc2tlIHZvbGlsbmUgZW5vdGU=" "RHLFvmF2bm96Ym9yc2thIHZvbGlsbmEgZW5vdGE="
Expand Down

0 comments on commit bf3be18

Please sign in to comment.