topojson

Maximum Data File Size for D3.js

心已入冬 提交于 2019-11-30 21:50:14
What is the limiting factor with data file size for D3js? Is it just how long it takes for the file to load from the server to the client? I'm trying to create a road map of Chicago, where you can hover over the road to get it's name and highlight it. The file size was 125 MB from the city. I stripped it down to 30 MB by removing unnecessary information, and then converted it to a TopoJSON file bringing it down to 5.1MB. Is this an unruly file size? There are three limiting factors when working with large amounts of data: The size of the file to load and the connection speed of the server

Ways to project topojson?

两盒软妹~` 提交于 2019-11-30 21:22:37
Given a shapefile : Natural_earth/ ne_10m_admin_0_sovereignty.zip Given we want to reproject it for a D3js data viz, we could reproject at different levels. 1. Get a reprojected shapefile ( 1 ), using ogr2ogr : ogr2ogr -f 'ESRI Shapefile' -t_srs 'EPSG:...' output.shp input.shp OR 2. get a reprojected topojson ( 2 ), using (npm) topojson.js : topojson \ -o output.topo.json --projection 'd3.geo.albersUsa()' \ -q 1e5 \ -s 1 \ -- input.shp OR 3. get a reprojected D3js data / SVG ( 1 ), D3js code including: var path = d3.geo.path() .projection(d3.geo.albersUsa()) // unsure of this syntaxe,

How can I make a map using GeoJSON data in Altair?

时光毁灭记忆、已成空白 提交于 2019-11-30 18:25:01
问题 I'm very new to mapping, and to Altair/Vega. There's an example in the Altair documentation for how to make a map starting with an outline of US states, which is created basically with: states = alt.topo_feature(data.us_10m.url, feature='states') # US states background background = alt.Chart(states).mark_geoshape( fill='lightgray', stroke='white' ) but I want to plot points in the British Isles, instead. Since there are only US and World maps in the vega data collections, I would have to

Maximum Data File Size for D3.js

梦想的初衷 提交于 2019-11-30 17:09:58
问题 What is the limiting factor with data file size for D3js? Is it just how long it takes for the file to load from the server to the client? I'm trying to create a road map of Chicago, where you can hover over the road to get it's name and highlight it. The file size was 125 MB from the city. I stripped it down to 30 MB by removing unnecessary information, and then converted it to a TopoJSON file bringing it down to 5.1MB. Is this an unruly file size? 回答1: There are three limiting factors when

Ways to project topojson?

拜拜、爱过 提交于 2019-11-30 17:08:29
问题 Given a shapefile : Natural_earth/ne_10m_admin_0_sovereignty.zip Given we want to reproject it for a D3js data viz, we could reproject at different levels. 1. Get a reprojected shapefile (1), using ogr2ogr : ogr2ogr -f 'ESRI Shapefile' -t_srs 'EPSG:...' output.shp input.shp OR 2. get a reprojected topojson (2), using (npm) topojson.js : topojson \ -o output.topo.json --projection 'd3.geo.albersUsa()' \ -q 1e5 \ -s 1 \ -- input.shp OR 3. get a reprojected D3js data / SVG (1), D3js code

Is it possible to determine if a GeoJSON point is inside a GeoJSON polygon using JavasScript?

扶醉桌前 提交于 2019-11-30 08:34:38
Is it possible to determine whether a GeoJSON point at a given lat,lon lies within a given GeoJSON polygon using only JavaScript (either through d3, topojson, or any other way)? For example, I can draw a map showing countries in the UK based on the tutorial here . I then have a some points which have coordinates but no indication as to which country they lie within. I would like to display a total point count for each country. Can I work out which country contains each point in the browser, or do I need to preprocess my point data on the server using PostGIS or similar? Seems like d3 has you

D3js: How to design topographic maps?

别说谁变了你拦得住时间么 提交于 2019-11-30 07:03:42
Given a GIS raster with elevation data, How to design a topographic map in D3js ? Is there any example of relief / topographic maps of cropped lands made using D3js ? Not working: I explored the posibility of .tif > gdal_contour.py > .shp > topojson > d3js without success. I use a makefile which contain all my commands. As my area of interest (France) is a crop of land areas, the gdal_contour.py approach generates broken isolines which does NOT create closed polygons. Also, the SVG end result fails. The only example of D3 topographic map I know is about Iceland , which, as an island, avoid

Error installing contextify- node-gyp rebuild failed

不羁岁月 提交于 2019-11-30 07:03:09
Edit I upgraded node and ran "npm install -g contextify" It looks like it installed fine (no errors), but typing in "which contextify" returns nothing. Message while installing contextify: npm http GET https://registry.npmjs.org/contextify npm http 304 https://registry.npmjs.org/contextify npm http GET https://registry.npmjs.org/bindings npm http 304 https://registry.npmjs.org/bindings > contextify@0.1.6 install /usr/local/share/npm/lib/node_modules/contextify > node-gyp rebuild CXX(target) Release/obj.target/contextify/src/contextify.o SOLINK_MODULE(target) Release/contextify.node SOLINK

Topojson: quantization VS simplification

我的未来我决定 提交于 2019-11-29 20:59:55
What is the difference between quantization and simplification ? Is quantization another way of doing simplification? Is it better to use quantization in certain situations? Or should i be using a combination of both? The total size of your geometry is controlled by two factors: the number of points and the number of digits (the precision) of each coordinate . Say you have a large geometry with 1,000,000 points, where each two-dimensional point is represented as longitude in ±180° and latitude in ±90°: [-90.07231180399987,29.501753271000098],[-90.06635619599979,29.499494248000133],… Real

Difference between GeoJSON and TopoJSON

做~自己de王妃 提交于 2019-11-29 18:51:09
What is the difference between GeoJSON and TopoJSON and when would I use one over the other? The description of TopoJSON on GitHub implies the TopoJSON files are 80% smaller. So why not just use TopoJSON all the time? mbostock If you care about file size or topology, then use TopoJSON. If you don’t care about either, then use GeoJSON for simplicity’s sake. The primary advantage of TopoJSON is size. By eliminating redundancy and using a more efficent fixed-precision integer encoding of coordinates, TopoJSON files are often an order of magnitude smaller than GeoJSON files. The secondary