topojson

Power BI. Using custom map as base map

半城伤御伤魂 提交于 2021-02-11 14:30:42
问题 Currently, I am trying to find a way to load a custom map as a base map in Power BI. As I want to be able to load the map even when I have no connection to the internet, I have considered using my company's WMS servers, however that does not seem to be possible in Power BI right now. Thus, I'm trying to convert this file https://data.gov.sg/dataset/master-plan-2014-planning-area-boundary-web to the TopoJSON format so I am able to use it as a shape map in Power BI. After using the Mapshaper

Power BI. Using custom map as base map

≯℡__Kan透↙ 提交于 2021-02-11 14:28:18
问题 Currently, I am trying to find a way to load a custom map as a base map in Power BI. As I want to be able to load the map even when I have no connection to the internet, I have considered using my company's WMS servers, however that does not seem to be possible in Power BI right now. Thus, I'm trying to convert this file https://data.gov.sg/dataset/master-plan-2014-planning-area-boundary-web to the TopoJSON format so I am able to use it as a shape map in Power BI. After using the Mapshaper

How can I scale my map to fit my svg size with d3 and geojson path data

烂漫一生 提交于 2021-02-05 09:11:43
问题 I am trying to create a d3 SVG that draws a map of New York State and scale it so that it fits the size of my SVG, the issue I am having is that when I use .fitSize([height, width], mapObject) it only returns a NaN error in the console. the topoJSON file of NYS I am using I am able to get the map to display without scaling but of course, it is not optimized and needs to be scaled I have attempted what is said in this post but I have not figured out the correct solution var map = d3.json('./ny

react-leaflet: adding a TopoJSON layer

爷,独闯天下 提交于 2021-01-27 18:23:01
问题 I just started using the react-leaflet library and got a map to load with a geoJSON layer, however I would like to use a TopoJSON layer instead. I know that it is possible with pure Leaflet like this: https://gist.github.com/rclark/5779673/. But how would I go about doing this with React-Leaflet? Edit class MapViz extends React.Component { getStyle() {...}; render() { const position = [x,y]; var geoData = topojson.feature(test_topo,test_topo.objects).geometries; return ( <Map id="my-map"

Large geojson to topojson

百般思念 提交于 2020-01-17 06:41:52
问题 I am trying to convert a relatively large geojson file (383 MB) to topojson to use it with D3.js. I am running the following command on a mac book pro 2016: geo2topo test.json > test.topojson and also the following command for simplification: geo2topo test.json > test.topojson -q 10000 Both of them produce the same following error: buffer.js:503 throw new Error('"toString()" failed'); ^ Error: "toString()" failed at Buffer.toString (buffer.js:503:11) at JSON.parse () at ReadStream. (/usr

How can I color ocean with topojson in d3 when I have coordinate info for land?

試著忘記壹切 提交于 2020-01-04 01:30:46
问题 I am learning topojson with d3. I have coordinate information for land, which is rendered correctly. Then, how can I add color to ocean (basically outside land)? I tried coloring graticule, but doesn't fill up the entire map and leaves empty spots. The visualization is hosted on http://jbk1109.github.io/ var projection = d3.geo.stereographic() .scale(245) .translate([width / 2, height / 2]) .rotate([-20, 0]) .clipAngle(180 - 1e-4) .clipExtent([[0, 0], [width, height]]) .precision(.1); var

How can I color ocean with topojson in d3 when I have coordinate info for land?

南笙酒味 提交于 2020-01-04 01:30:07
问题 I am learning topojson with d3. I have coordinate information for land, which is rendered correctly. Then, how can I add color to ocean (basically outside land)? I tried coloring graticule, but doesn't fill up the entire map and leaves empty spots. The visualization is hosted on http://jbk1109.github.io/ var projection = d3.geo.stereographic() .scale(245) .translate([width / 2, height / 2]) .rotate([-20, 0]) .clipAngle(180 - 1e-4) .clipExtent([[0, 0], [width, height]]) .precision(.1); var

Command line install of topojson throwing fatal error

混江龙づ霸主 提交于 2020-01-02 08:05:24
问题 I'm trying to install topojson on OSX Maverick and I'm getting a fatal error: fatal error: 'sys/types.h' file not found . I include below what leads up to the error in the terminal and then everything that follows. I just installed node.js specifically for this - so I'm not sure which package the issue is related to. ... npm http 304 https://registry.npmjs.org/boom npm http 304 https://registry.npmjs.org/hoek npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5 CXX(target) Release/obj

How to know if topojson is installed and working normally?

北城余情 提交于 2019-12-30 14:49:42
问题 How to know if topojson is well installed and working normally? An example tiny file to convert will be appreciate. with both the source and expected result 回答1: If you haven't stumbled across this yet I found it to be a great walkthrough of the entire process: http://bost.ocks.org/mike/map/ The above link also includes the command to run to check if topojson is installed: $which topojson If topojson is installed correctly this will print out the directory where it's installed, which might

Making a SVG path like a smooth line instead of being ragged

谁都会走 提交于 2019-12-30 08:28:10
问题 Well in my project I create river lines from pathes . And due to my kind of big stroke-width it is very ragged : I already searched around. But the only thing I found was stroke-linejoin: round; . As you can see here: it is way better but I'm still not satisfied. Is there any way to get a really smooth line. Or let's say too have a even "rounder" linejoin ? 回答1: An interesting direction is to leverage d3.svg.line to generate paths from the coordinates of your geoJSON feature, at which point