1

I am attempting to get a topojson file with US state names & ids. Using http://www.tnoda.com/blog/2013-12-07 for reference.

I read that it was recommended we generate our own topojson files and I have been attempting to get ogr2ogr working on MAC OSX v 10.7.5.

Running ogr2ogr in the command line gives:

dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
  Referenced from: /usr/local/bin/ogr2ogr
  Reason: Incompatible library version: ogr2ogr requires version 13.0.0 or later, but   libjpeg.8.dylib provides version 9.0.0
Trace/BPT trap: 5

I am not sure what its complaining about. Most recent version of libjpeg is not 13 but 9. I thought it might want version 8 instead. But I still get the same error after following installation instructions from http://ijg.org/files/jpegsrc.v8a.tar.gz.

Any help would be very much appreciated. Thank you!

P.S: My end goal is to get a map like this http://bl.ocks.org/mbostock/4060606 but I need the 2 letter state names in the json since thats what I have in my data.

Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204
shrnkrn
  • 121
  • 1
  • 9

1 Answers1

0

Fixed this! uninstall gdal and reinstall it again.

brew uninstall gdal
brew install gdal -> Did not work. it wanted to link jpeg libtiff
brew link jpeg libtiff -> It might tell you to remove certain files but its simple.
brew install gdal -> worked!
ogr2ogr -> prints usage instructions instead of some cryptic error

I guess my installation of libjpeg had lingering incompatible files. Not sure.

shrnkrn
  • 121
  • 1
  • 9