New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hole issue in contour #35
Comments
These are probably zones where there is not a lot of density of the initial points, so density contours create holes. This is expected and the correct solution. You can however remove holes by drawing only the first ring of each polygon in the GeoJSON. Note however that this is not the right place to ask for help. Instead please use the Stack Overflow tag d3.js. Thousands of D3-related questions have been asked there, and some answers may be relevant to you. When asking for help, please include a link to demonstrate the issue, preferably as an Observable notebook. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response. If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack. Thank you! 🤖 |
Thank you for your kind reply.
I'm sorry that i misunderstood about contour and contour density of your
library.
I wanted to make contours by z value using random points which have x,y,z
values.
It means I don't have n x m points array data.
Is it possible to make the contours using d3 library.
Thanks so much.
…On Thu, Dec 5, 2019 at 10:10 PM Philippe Rivière ***@***.***> wrote:
Closed #35 <#35>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#35?email_source=notifications&email_token=ADLN7JB6QSKOKTRVDVQSAALQXFG3JA5CNFSM4JV2VFB2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVJUJIUA#event-2858980432>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLN7JF2TDA3POWFUN7N3O3QXFG3JANCNFSM4JV2VFBQ>
.
|
For this purpose, I believe one would need to compute the gradient on the
intermediate array value0, before calling the contours, at
https://github.com/d3/d3-contour/blob/master/src/density.js#L63
Unfortunately this array is not exposed and only used internally, so this
may require a modification of d3-contour (or to write your own method
explicitly). Not a simple matter.
|
Is it possible to make (n x m) elevation array from random points data?
(each random point has its elevation value with x, y)
…On Fri, Dec 6, 2019 at 10:30 AM Philippe Rivière ***@***.***> wrote:
For this purpose, I believe one would need to compute the gradient on the
intermediate array value0, before calling the contours, at
https://github.com/d3/d3-contour/blob/master/src/density.js#L63
Unfortunately this array is not exposed and only used internally, so this
may require a modification of d3-contour (or to write your own method
explicitly). Not a simple matter.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#35?email_source=notifications&email_token=ADLN7JCCK6ZQ37EMSJPVTGDQXH5SHA5CNFSM4JV2VFB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGDIUYQ#issuecomment-562465378>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLN7JAP2ZUOWWFKYL4RIJLQXH5SHANCNFSM4JV2VFBQ>
.
|
Yes, in this case it's called spatial interpolation: you have a set of
points with known values, and you want to create a function that
interpolates for the unknown points.
There are many methods for spatial interpolation. I have a collection of
notebooks on this topic
https://observablehq.com/collection/@fil/interpolation
My notebooks are mostly geospatial (on the whole globe), but the techniques
are very much the same for a plane.
See
http://www.bisolutions.us/A-Brief-Introduction-to-Spatial-Interpolation.php for
a reference text.
Though they look very similar, spatial interpolation is not the same as
density plots. In the case of density plots, each point adds its weight
locally — and the weight is then spread around, with "blurring". (In a
density plot, if you have two points in the same position, the weight is
doubled; in spatial interpolation, if you have two measurements in the same
position, the interpolated value is the mean of the measurements.)
|
I got an issue that there are holes while drawing contours.
When i change size, it sometimes appears and sometimes disappears.
Please advise if anyone can help me out.
Thank you.
The text was updated successfully, but these errors were encountered: