Skip to content

Commit

Permalink
outputs countysubs csv files to 1 dir
Browse files Browse the repository at this point in the history
  • Loading branch information
bradoyler committed Oct 29, 2016
1 parent 611a510 commit d4c389d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions us-towns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ wy
# NewEnglandStates=ct me ma nh ri vt

all:
for i in ${STATES} ; do make shp/$$i/countysubs.shp csv/$$i/countysubs.csv ; done
for i in ${STATES} ; do make shp/$$i/countysubs.shp csv/$$i\_countysubs.csv ; done

.SECONDARY:

Expand Down Expand Up @@ -135,7 +135,12 @@ topo/tx/countysubs.json: shp/tx/countysubs.shp
-p NAME,STATEFP,COUNTYFP,COUSUBFP \
-- countysubs=$<

csv/%/countysubs.csv: shp/%/countysubs.shp
csv/%_countysubs.csv: shp/%/countysubs.shp
mkdir -p $(dir $@)
rm -f $@
ogr2ogr -f 'CSV' -select STATEFP,COUNTYFP,COUSUBFP,NAME,NAMELSAD -progress $@ $<

csv/%_countysubs-full.csv: shp/%/countysubs.shp
mkdir -p $(dir $@)
rm -f $@
ogr2ogr -f 'CSV' -progress $@ $<
Expand Down Expand Up @@ -168,7 +173,7 @@ topo/ma/towns.json: geo/ma/towns.json
--id-property=+TOWN_ID \
-- towns=$<

csv/ma/towns.csv: shp/ma_towns/TOWNSSURVEY_POLYM.shp
csv/ma_towns.csv: shp/ma_towns/TOWNSSURVEY_POLYM.shp
mkdir -p $(dir $@)
rm -f $@
ogr2ogr -f 'CSV' -progress $@ $<
Expand Down

0 comments on commit d4c389d

Please sign in to comment.