Questions tagged [d3-geo]
7 questions
5
votes
2 answers
Can't import d3-geo package into Node.js TypeScript project
I'm trying to create code to test whether specific latitude/longitude coordinates can be found within various GeoJSON Features.
If I do this:
import d3 from 'd3-geo'; // or: import * as d3 from 'd3-geo' // makes no…

kshetline
- 12,547
- 4
- 37
- 73
2
votes
0 answers
d3-geo coordinate in feature always returning true
I have a geojson file defined, and I am checking to see whether a coordinate is in the given feature inside that geojson file. No matter what coordinate I plug in to the d3.geocontains() function, inRegion is always set to true, when obviously…

nickcoding2
- 142
- 1
- 8
- 34
1
vote
0 answers
Path elements outside svg [d3-geo, topojson]
I made a choropleth map for freecodecamp project.
https://codepen.io/prewol/pen/rNvxGZy
the g elements start outside the svg parent
.graphCont {
margin: auto;
background-color: beige;
box-shadow: 5px 5px 10px rgb(60, 80, 92);
border-radius:…

P W
- 11
- 3
0
votes
0 answers
How to layout nodes using geo coordinates in reactflow which are close to each other
I'm trying to project nodes using the d3-geo and reactflow libraries. The nodes xPos and yPos(x and y positions) are longitudes and latitudes. And I use the below approach to map those positions to pixels.
const projection =…

simpywatch
- 43
- 5
0
votes
0 answers
scaling problem with d3j.js geo map visualisation with topojson file
I use d3 version 4.0.0. and topojson.min.js to produce a map using german topo json data. I achieved to get the map on the browser however map appears very small.
I tried many ways to scale it but could not achieve to enlarge the size of the map.
I…

Rasim AVCI
- 133
- 2
- 4
- 11
0
votes
0 answers
D3 path not showing
I am trying to make some features from a .geojson file render using D3 and D3geo and i am following this https://www.d3indepth.com/geographic/ as a guide. I don't really know what i am doing since i am not good at programing. It shows no errors on…
0
votes
1 answer
Simplifying a GeoJson FeatureCollection using mapshaper causes issues
More specifically, it causes the same code to render an outline on the map, and only recognizes the last path element when using pointer events.
I simplified a continents.json file on mapshaper using their website and replaced the file in my…

Mason Clark
- 201
- 2
- 7