1

thanks for reading this; I could use some help.

I read this article, it is about creating a makefile to convert a topojson file from a .shp file. I am following the steps contained in downloadable Makefile available whithin the article's link, however I simply can't get to create the .json file; it just doesn't appear. These are the steps I am trying to replicate:

    curl -o counties.zip 'http://www2.census.gov/geo/tiger/GENZ2010/gz_2010_us_050_00_20m.zip'
    unzip counties.zip
    touch gz_2010_us_050_00_20m.shp
    topojson -o counties.json -- counties=gz_2010_us_050_00_20m.shp

Step 4 is simply not working. I have no reason to think topojson is not properly installed, although I have never been able to create a topojson file. What could be wrong?

After downloading the Makefile and executing it in order to convert the topojson file the following message is displayed in the terminal:

topojson -o counties.json -- counties=gz_2010_us_050_00_20m.shp make: *** [counties.json] Error 1

These are some of my PC's specifications:

  • I am running Ubuntu on Oracle virtualbox v4.3.26, my main OS is Windows 8 64 bit.
  • Intel Celeron 1.90 GHz
  • 4.00 GB Ram.

Thank you very much for your help in advance.

Hugolpz
  • 17,296
  • 26
  • 100
  • 187
Daniel Urencio
  • 123
  • 3
  • 10
  • I assume the unzipped .shp name is correct since `touch` doesn't fail. Then, try to simplify the output via `-q 1e4`. It gives `topojson -q 1e4 -o counties.json -- counties=gz_2010_us_050_00_20m.shp` it may help. – Hugolpz Apr 05 '15 at 05:42
  • Still not working. topojson -q 1e4 -o counties.json -- counties=gz_2010_us_050_00_20m.shp make: *** [counties.json] Error 1 – Daniel Urencio Apr 05 '15 at 17:29
  • Not working either, both when the command is executed and the Makefile is run. Thanks for the help. – Daniel Urencio Apr 05 '15 at 17:30

1 Answers1

1

Process validation

Your / The following commands are correct :

curl -o counties.zip 'http://www2.census.gov/geo/tiger/GENZ2010/gz_2010_us_050_00_20m.zip'
unzip counties.zip
touch gz_2010_us_050_00_20m.shp
topojson -o counties.json -- counties=gz_2010_us_050_00_20m.shp

Running it is successful :

enter image description here

Visualisation is fine :

enter image description here

File is visible, to inspect, and downloable there, on jsoneditoronline.org.

Way to go

Did you ever produced a single topojson file via the command line topojson script ? If not, I guess topojson is either not installed or corrupted. There is a common issue with some dependency. I advice you to uninstall topojson, then to reinstall it.

Bug repporting

Please report the error message you get when running topojson -o counties.json -- counties=gz_2010_us_050_00_20m.shp without makefile. So we get a topojson or npm error, not the make error.

Next

Search for "how to install topojson + bug". Example : Trouble installing topojson on ubuntu

Community
  • 1
  • 1
Hugolpz
  • 17,296
  • 26
  • 100
  • 187