Git Product home page Git Product logo

world-atlas's Introduction

TopoJSON

TopoJSON is an extension of GeoJSON that encodes topology. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs. This technique is similar to Matt Bloch’s MapShaper and the Arc/Info Export format, .e00.

TopoJSON eliminates redundancy, allowing related geometries to be stored efficiently in the same file. For example, the shared boundary between California and Nevada is represented only once, rather than being duplicated for both states. A single TopoJSON file can contain multiple feature collections without duplication, such as states and counties. Or, a TopoJSON file can efficiently represent both polygons (for fill) and boundaries (for stroke) as two feature collections that share the same arc mesh. See How To Infer Topology for a visual explanation of how TopoJSON works. See Command-Line Cartography for an introduction to TopoJSON and related tools. See TopoJSON Format Specification for the format specification.

To further reduce file size, TopoJSON can use quantized delta-encoding for integer coordinates. This is similar to rounding coordinate values (e.g., LilJSON), but with greater efficiency and control over loss of information. And like GeoJSON, TopoJSON files are easily modified in a text editor and amenable to gzip compression.

As a result, TopoJSON is substantially more compact than GeoJSON, frequently offering a reduction of 80% or more even without simplification. Yet encoding topology also has numerous useful applications for maps and visualization above! It allows topology-preserving shape simplification, which ensures that adjacent features remain connected after simplification; this applies even across feature collections, such as simultaneous consistent simplification of state and county boundaries. Topology can also be used for Dorling or hexagonal cartograms, as well as other techniques that need shared boundary information such as automatic map coloring.

Installing

If you use NPM, npm install topojson. Otherwise, download the latest release. You can also load directly from d3js.org as a standalone library. AMD, CommonJS, and vanilla environments are supported. In vanilla, a topojson global is exported:

<script src="https://unpkg.com/topojson@3"></script>
<script>

var topology = topojson.topology({foo: geojson});

</script>

Try topojson in your browser.

API Reference

world-atlas's People

Contributors

bfred-it avatar ccbcreg avatar mbostock avatar nobuf avatar tanner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

world-atlas's Issues

should quantization be more aggressive?

The current quantization for the 1:50m scale data is to 400 meter precision (max quantization error 200m) in the longitude direction at the equator, and 200 meter precision (max quantization error 100m) in the latitude direction.

This corresponds to a max diagonal error of <225 meters, which at 1:50m scale corresponds to a length of 4.5 μm = 0.0045 mm. This seems like it might be overkill, especially since the data points are (with a few rare exceptions) substantially further apart than that.

I wonder if it would be worth picking a coarser target for quantization error. For example if we say we will have ~1500 meter precision (max quantization error 750m) in both longitude and latitude directions, then the max diagonal quantization error will be about 1.06 kilometers, which at map scale is 21 μm = 0.02 mm. If we use this choice of scale, then after delta-encoding and gzip, the arcs portion of the land50 gets compressed by >25% compared to the current file. The largest number involved would no longer be 99999, but that seems like an artificial choice.

In general, I would recommend picking the same scale for latitude and longitude, unless there is some obvious reason why latitude needs to be more granular. Even just coarsening the latitude quantization to match longitude on the land50 data will be a savings of about 6% of the gzipped size of the arcs portion of the file, compared to the current version.

Missing IDs for several features

Greetings,

I noticed there are several instances where the id is -99, and wanted to share this visualization of missing IDs.

image

Perhaps it's a problem with the upstream data in Natural Earth, but nonetheless it's surprising that the UAE has this value as its ID.

The Natural Earth Changelog indicates the latest release was 2018-05-21.

Maybe a fresh run of npm version patch and npm publish would fix the issue? I see the world-atlas package has not seen a fresh release for some time now.

Many thanks.

topojson prunes all arcs

The following minimal GeoJSON example leads to an evaluation of the bounds as "Infinity" and as a result to all the arcs being pruned, is there a problem with the GeoJSON or is there a bug? Out of 106 features from the same dataset only this one produces no output…

{
    "features": [
        {
            "geometry": {
                "coordinates": [
                    [
                        [
                            [
                                6.377132,
                                49.748352
                            ],
                            [
                                6.375522,
                                49.744303
                            ],
                            [
                                6.377847,
                                49.743939
                            ],
                            [
                                6.37652,
                                49.741297
                            ],
                            [
                                6.37931,
                                49.740577
                            ],
                            [
                                6.380656,
                                49.735715
                            ],
                            [
                                6.368722,
                                49.734186
                            ],
                            [
                                6.35703,
                                49.734784
                            ],
                            [
                                6.351243,
                                49.738167
                            ],
                            [
                                6.344962,
                                49.735384
                            ],
                            [
                                6.348235,
                                49.732016
                            ],
                            [
                                6.344797,
                                49.730416
                            ],
                            [
                                6.343951,
                                49.73194
                            ],
                            [
                                6.328991,
                                49.73312
                            ],
                            [
                                6.328719,
                                49.734959
                            ],
                            [
                                6.31641,
                                49.735494
                            ],
                            [
                                6.309641,
                                49.73409
                            ],
                            [
                                6.307233,
                                49.735783
                            ],
                            [
                                6.303442,
                                49.735739
                            ],
                            [
                                6.304133,
                                49.737798
                            ],
                            [
                                6.299957,
                                49.736293
                            ],
                            [
                                6.298416,
                                49.738748
                            ],
                            [
                                6.274855,
                                49.744334
                            ],
                            [
                                6.264931,
                                49.744322
                            ],
                            [
                                6.26477,
                                49.745477
                            ],
                            [
                                6.280762,
                                49.753111
                            ],
                            [
                                6.284782,
                                49.749357
                            ],
                            [
                                6.300924,
                                49.757149
                            ],
                            [
                                6.316515,
                                49.759225
                            ],
                            [
                                6.313824,
                                49.761378
                            ],
                            [
                                6.323426,
                                49.766417
                            ],
                            [
                                6.322917,
                                49.763515
                            ],
                            [
                                6.329997,
                                49.766492
                            ],
                            [
                                6.330187,
                                49.765056
                            ],
                            [
                                6.3382,
                                49.764392
                            ],
                            [
                                6.347792,
                                49.760157
                            ],
                            [
                                6.365712,
                                49.765077
                            ],
                            [
                                6.365276,
                                49.770364
                            ],
                            [
                                6.370438,
                                49.767834
                            ],
                            [
                                6.372173,
                                49.768547
                            ],
                            [
                                6.375543,
                                49.763431
                            ],
                            [
                                6.377495,
                                49.76428
                            ],
                            [
                                6.379526,
                                49.761744
                            ],
                            [
                                6.381862,
                                49.762603
                            ],
                            [
                                6.37843,
                                49.768712
                            ],
                            [
                                6.385743,
                                49.772629
                            ],
                            [
                                6.396771,
                                49.774086
                            ],
                            [
                                6.400898,
                                49.766588
                            ],
                            [
                                6.397417,
                                49.758436
                            ],
                            [
                                6.391546,
                                49.754565
                            ],
                            [
                                6.386582,
                                49.755653
                            ],
                            [
                                6.383227,
                                49.75197
                            ],
                            [
                                6.37806,
                                49.75137
                            ],
                            [
                                6.377132,
                                49.748352
                            ]
                        ]
                    ],
                    [
                        [
                            [
                                6.37843,
                                49.768712
                            ],
                            [
                                6.373727,
                                49.76727
                            ],
                            [
                                6.374158,
                                49.769766
                            ],
                            [
                                6.37843,
                                49.768712
                            ]
                        ]
                    ]
                ],
                "type": "Polygon"
            },
            "id": 2,
            "properties": {
                "commune": "bech"
            },
            "type": "Feature"
        }
    ],
    "type": "FeatureCollection"
}

110m has 4 "cracks" between countries

There are four "cracks" in 110m, where border segments that are well aligned in the countries layer are not identified properly and create small internal polygons in the land layer. They don't correspond to lakes or anything substantial that I can see.

(Those segments are, consistently, missing from the borders mesh.)

cracks

I noticed it with d3 first, by zooming, and checked with QGIS. I've run it from the original data sources (NE source, compiled by world-atlas on my computer, and unpkg/world-atlas). It's always the same 4 cracks.

Here's a closer look to the Surinam crack
surinam crack

Fails when running prepublish script

Something may have changed upstream, as the prepublish script currently fails.

This is the output:

$ npm run prepare

> [email protected] prepare /home/curran/repos/world-atlas
> bash prepublish

removed 'world/50m.json'
removed 'world/50m.tsv'
removed 'world/110m.tsv'
removed 'world/110m.json'
removed directory 'world'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Archive:  build/ne_110m_admin_0_countries.zip
  inflating: build/ne_110m_admin_0_countries.README.html  
 extracting: build/ne_110m_admin_0_countries.VERSION.txt  
 extracting: build/ne_110m_admin_0_countries.cpg  
  inflating: build/ne_110m_admin_0_countries.dbf  
  inflating: build/ne_110m_admin_0_countries.prj  
  inflating: build/ne_110m_admin_0_countries.shp  
  inflating: build/ne_110m_admin_0_countries.shx  
evalmachine.<anonymous>:1
(a.iso_a3.localeCompare(b.iso_a3))
          ^

TypeError: Cannot read property 'localeCompare' of undefined
    at evalmachine.<anonymous>:1:11
    at Script.runInContext (vm.js:102:20)
    at /home/curran/repos/world-atlas/node_modules/ndjson-cli/ndjson-sort:48:75
    at Array.sort (native)
    at Interface.<anonymous> (/home/curran/repos/world-atlas/node_modules/ndjson-cli/ndjson-sort:48:8)
    at Interface.emit (events.js:187:15)
    at Interface.close (readline.js:379:8)
    at Socket.onend (readline.js:157:10)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1081:12)
undefined:1

prepublish script uses "iso_n3" key as id which has non-unique values

| ndjson-map '(d.id = d.properties.iso_n3, delete d.properties, d)') \

The line above sets id to the value of d.properties.iso_n3 from Natural Earth's dbf which has 5 instances where its value is -99. (N. Cyprus, Indian Ocean Ter., Siachen Glacier, Kosovo and San Marino).

Is this intentional? If not, I think we can use key brk_a3 instead (which, if I'm not mistaken, has no non-unique values).

(The line's link https://github.com/topojson/world-atlas/blob/master/prepublish#L17)

The countries-110m.json file seems to be invalid

I'm unable to load it in mapshaper--when I run it through the debugger, it looks like the rings aren't getting parsed properly, and are being passed through as undefined for the shape iterator functions.

Add POP_EST attribute

Hello there,

First of all, thank you for all this work. I mean, seriously: d3, topojson, observable.. You made the day of all geographers and data viz geeks!

Would it be possible to share the command line you use to generate the countries-50m.json, so I can integrate the POP_EST attribute?

Thank you!

Target 'topo/world-10m.json' fails.

While looking for a countries-json, I tried the topo/world-10m.json-target because it seems to contain the ISO alpha-3 code, but it fails making it:

~/workspace/_tmp/world-atlas$ make topo/world-10m.json
mkdir -p topo/
node_modules/.bin/topojson -q 1e5 --id-property=+iso_n3 -- land=shp/ne_10m_land.shp countries=shp/ne_10m_admin_0_countries.shp | ./topomerge land > topo/world-10m.json
bounds: -1.5768348533065902e+308 -1.7728960695858624e+308 1.753085161088212e+308 1.641883998050292e+308 (cartesian)
quantization: Infinity Infinity
topology: 87 arcs, 273 points
prune: retained 0 / 87 arcs (0%)

/home/jieter/workspace/_tmp/world-atlas/topomerge:12
object.geometries.forEach(function(g, i) {
                  ^
TypeError: Cannot call method 'forEach' of undefined
    at Object.<anonymous> (/home/jieter/workspace/_tmp/world-atlas/topomerge:12:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
make: *** [topo/world-10m.json] Error 8

Maldives path remains open when rendering chart in D3

I am trying to render the world map with D3 using countries-10m data.
I am converting the data to GeoJSON features using the topojson-client library before rendering.
But when I apply the fill it just fills up the entire map. On debugging I found that if i remove Maldives from the feature set, the fill is applied correctly to only the countries.

Is this some bug in the data with the Maldives borders?

Note: I did not get this with countries-50m and countries-110m topojson datasets

Referencing geometry from TSV file

The topojson file only has one id, ranging from "001" to "178". This ID is present as iso_n3 in the TSV file, but they start from 1 to 278.

For example, Australia would be "036" in the topojson file, and 36 in the TSV file.

is it possible to not zero-pad the topojson id to make cross referencing a little bit easier?

Keep properties frequently used as ID for datasets.

By default, keep -p name=ADMIN,iso2=WB_A2,iso3=WB_A3 since in many cases, the csv we plug onto the topojson use these previous values as ID, it would ease hooking the topojson and the data.

On [email protected], should be something like :

# download NaturalEarthData
curl \
    -L -C - 'https://github.com/nvkelso/natural-earth-vector/archive/v4.0.0.zip' \
    -o ./ne.shp.zip
unzip -n ./ne.shp.zip -d ./
# Install topojson v.1 locally
npm install [email protected]
# Run topojson
node ./node_modules/topojson/bin/topojson -q 1e3 --bbox \
     -p name=ADMIN,iso2=WB_A2,iso3=WB_A3 \
     -o world-all.json \
     -- countries=./natural-earth-vector-4.0.0/10m_cultural/ne_10m_admin_0_countries.shp

Note: NE v4.0 data is :

{
  "properties": {
    "scalerank": 0,
    "featurecla": "Admin-0 country",
    "LABELRANK": 2,
    "SOVEREIGNT": "France",
    "SOV_A3": "FR1",
    "ADM0_DIF": 1,
    "LEVEL": 2,
    "TYPE": "Country",
    "ADMIN": "France",
    "ADM0_A3": "FRA",
    "GEOU_DIF": 0,
    "GEOUNIT": "France",
    "GU_A3": "FRA",
    "SU_DIF": 0,
    "SUBUNIT": "France",
    "SU_A3": "FRA",
    "BRK_DIFF": 0,
    "NAME": "France",
    "NAME_LONG": "France",
    "BRK_A3": "FRA",
    "BRK_NAME": "France",
    "BRK_GROUP": null,
    "ABBREV": "Fr.",
    "POSTAL": "F",
    "FORMAL_EN": "French Republic",
    "FORMAL_FR": null,
    "NAME_CIAWF": "France",
    "NOTE_ADM0": null,
    "NOTE_BRK": null,
    "NAME_SORT": "France",
    "NAME_ALT": null,
    "MAPCOLOR7": 7,
    "MAPCOLOR8": 5,
    "MAPCOLOR9": 9,
    "MAPCOLOR13": 11,
    "POP_EST": 67106161,
    "POP_RANK": 16,
    "GDP_MD_EST": 2699000,
    "POP_YEAR": 2017,
    "LASTCENSUS": -99,
    "GDP_YEAR": 2016,
    "ECONOMY": "1. Developed region: G7",
    "INCOME_GRP": "1. High income: OECD",
    "WIKIPEDIA": -99,
    "FIPS_10_": "FR",
    "ISO_A2": "-99",
    "ISO_A3": "-99",
    "ISO_A3_EH": "-99",
    "ISO_N3": "250",
    "UN_A3": "250",
    "WB_A2": "FR",
    "WB_A3": "FRA",
    "WOE_ID": -90,
    "WOE_ID_EH": 23424819,
    "WOE_NOTE": "Includes only Metropolitan France (including Corsica)",
    "ADM0_A3_IS": "FRA",
    "ADM0_A3_US": "FRA",
    "ADM0_A3_UN": -99,
    "ADM0_A3_WB": -99,
    "CONTINENT": "Europe",
    "REGION_UN": "Europe",
    "SUBREGION": "Western Europe",
    "REGION_WB": "Europe & Central Asia",
    "NAME_LEN": 6,
    "LONG_LEN": 6,
    "ABBREV_LEN": 3,
    "TINY": -99,
    "HOMEPART": 1,
    "MIN_ZOOM": 0,
    "MIN_LABEL": 1.7,
    "MAX_LABEL": 6.7
  }
}

For convenience for later data biding, topojson files would gain to have at least iso2 as hook :

{
  "type": "MultiPolygon",
  "arcs": [
    [ [4347,4348,4349] ],
    [ [4350,4350,4351,4352,4353,4354] ],
    [ [4355,4356,4357,4358,4358,4358,4359,4360,4361,-4350,4362,4363,-3047,-1961,-1960,-598], [4364], [4365] ]
  ],
  "properties": {
    "name": "Italy",
    "iso2": "IT",
    "iso3": "ITA"
  }
},

See also How to create optimal world topojson from free world shp : Aborted (core dumped)?
and its world-id.json that you can visualize in the distillery and explore in http://jsoneditoronline.org.

Country Codes strategies

Hi,
currently the country code data is in USDN format. However I could not find any JS library that handles those country codes. Is it possible to use more common codes like the ISO 3166-1 alpha 2 code
or ISO 3166-1 alpha 3 code (like it is used in the country-data npm package).

Thx for all the awesome work!

Best,
Matthias

Country borders are shown not according to United Nation regulations.

As far as I understood, the maps originate from natural earth vector. In their admin 0 notation, the maps show Crimea as a part of Russia. This does not follow US or EU regulations. Thus, websites and companies that rely on these maps often unknowingly do not follow the regulations provided by United Nations (including the map below https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json). You guys should consider informing users about this phenomena or proving alternative versions.

Russian boundaries causing strange map artifacts

I'm using this library to generate my own world-XXm.json files from the Natural Earth data, which will be then used with Mapbox. I've come up with an issue with strange artifacts appearing using both 110m and 50m.

screen shot 2014-06-23 at 2 52 08 pm

This is a shot from my sandbox application. I'm essentially using the tutorial here (https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-topojson/) on the Mapbox site. Using leaflet-omnivore to load the topojson file into Mapbox. I've noticed that the example on this tutorial page suffers from the same exact artifact, and I noticed the example happens to be using data generated from this library.

screen shot 2014-06-23 at 3 01 30 pm

I'm not sure whether this is a problem with the raw data from NE, or if it's a problem with this Makefile, or whether it's a problem with the topojson cli, or whether it's a problem with omnivore, or whether it's a problem with Mapbox itself. Hopefully you have an idea?

Thanks so much for making this and us-atlas. Really useful stuff.

`npm install` on freshly cloned repo fails

I have tried npm install on a freshly clone repo and got a failure:

╭─~/kaos/world-atlas (master ✔)
╰─ᐅ npm install

> [email protected] prepare /Users/espin/kaos/world-atlas
> bash prepublish

Warning: Illegal date format for -z, --timecond (and not a file name).
Warning: Disabling time condition. See curl_getdate(3) for valid date syntax.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  174k  100  174k    0     0  79446      0  0:00:02  0:00:02 --:--:-- 79489
Archive:  build/ne_110m_admin_0_countries.zip
  inflating: build/ne_110m_admin_0_countries.README.html
 extracting: build/ne_110m_admin_0_countries.VERSION.txt
 extracting: build/ne_110m_admin_0_countries.cpg
  inflating: build/ne_110m_admin_0_countries.dbf
  inflating: build/ne_110m_admin_0_countries.prj
  inflating: build/ne_110m_admin_0_countries.shp
  inflating: build/ne_110m_admin_0_countries.shx
evalmachine.<anonymous>:1
(a.iso_a3.localeCompare(b.iso_a3))
          ^

TypeError: Cannot read property 'localeCompare' of undefined
    at evalmachine.<anonymous>:1:11
    at Script.runInContext (vm.js:102:20)
    at /Users/espin/kaos/world-atlas/node_modules/ndjson-cli/ndjson-sort:48:75
    at Array.sort (native)
    at Interface.<anonymous> (/Users/espin/kaos/world-atlas/node_modules/ndjson-cli/ndjson-sort:48:8)
    at Interface.emit (events.js:187:15)
    at Interface.close (readline.js:374:8)
    at Socket.onend (readline.js:152:10)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1091:14)
undefined:1



SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /Users/espin/kaos/world-atlas/node_modules/d3-dsv/bin/json2dsv:29:70
    at Array.map (<anonymous>)
    at /Users/espin/kaos/world-atlas/node_modules/d3-dsv/bin/json2dsv:29:37
    at Socket.<anonymous> (/Users/espin/kaos/world-atlas/node_modules/rw/lib/rw/read-file.js:22:33)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1091:14)
    at process._tickCallback (internal/process/next_tick.js:174:19)
Warning: Illegal date format for -z, --timecond (and not a file name).
Warning: Disabling time condition. See curl_getdate(3) for valid date syntax.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  783k  100  783k    0     0  96854      0  0:00:08  0:00:08 --:--:--  198k
Archive:  build/ne_50m_admin_0_countries.zip
  inflating: build/ne_50m_admin_0_countries.README.html
 extracting: build/ne_50m_admin_0_countries.VERSION.txt
 extracting: build/ne_50m_admin_0_countries.cpg
  inflating: build/ne_50m_admin_0_countries.dbf
  inflating: build/ne_50m_admin_0_countries.prj
  inflating: build/ne_50m_admin_0_countries.shp
  inflating: build/ne_50m_admin_0_countries.shx
evalmachine.<anonymous>:1
(a.iso_a3.localeCompare(b.iso_a3))
          ^

TypeError: Cannot read property 'localeCompare' of undefined
    at evalmachine.<anonymous>:1:11
    at Script.runInContext (vm.js:102:20)
    at /Users/espin/kaos/world-atlas/node_modules/ndjson-cli/ndjson-sort:48:75
    at Array.sort (native)
    at Interface.<anonymous> (/Users/espin/kaos/world-atlas/node_modules/ndjson-cli/ndjson-sort:48:8)
    at Interface.emit (events.js:187:15)
    at Interface.close (readline.js:374:8)
    at Socket.onend (readline.js:152:10)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1091:14)
undefined:1



SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /Users/espin/kaos/world-atlas/node_modules/d3-dsv/bin/json2dsv:29:70
    at Array.map (<anonymous>)
    at /Users/espin/kaos/world-atlas/node_modules/d3-dsv/bin/json2dsv:29:37
    at Socket.<anonymous> (/Users/espin/kaos/world-atlas/node_modules/rw/lib/rw/read-file.js:22:33)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1091:14)
    at process._tickCallback (internal/process/next_tick.js:174:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepare: `bash prepublish`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/espin/.npm/_logs/2018-04-28T12_46_13_799Z-debug.log

Problem installing gdal

I'm on a Mac (Mavericks), and when I do brew install gdal it chugs for a while and eventually errors out with:

make: *** [frmts-target] Error 2
config.log was copied to /Users/iangilman/Library/Logs/Homebrew
==> Build Environment
CPU: 8-core 64-bit penryn
MacOS: 10.9.1-x86_64
Xcode: 5.0.2
MacPorts/Fink: port
X11: N/A
CC: /usr/bin/clang
CXX: /usr/bin/clang++
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CPPFLAGS: -I/usr/local/Cellar/readline/6.2.2/include
LDFLAGS: -L/usr/local/Cellar/readline/6.2.2/lib -lsqlite3
MAKEFLAGS: -j8
Error: Failed executing: make (gdal.rb:232)

Any tips on how to get it to work?

/cc @Tanner

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.