Code Monkey home page Code Monkey logo

Comments (10)

msbarry avatar msbarry commented on May 18, 2024 2

This guide also contains some useful info: https://github.com/nst-guide/terrain#contours-1 - it looks like DEM files can be processed in isolation then the results merged, which fits in well with Flatmap's goal of saturating cpus and limiting memory and disk usage. If the result gets blocky at higher zoom levels, there's also https://docs.geotools.org/stable/javadocs/org/geotools/geometry/jts/JTS.html#smooth-org.locationtech.jts.geom.Geometry-double-

from planetiler.

pgassmann avatar pgassmann commented on May 18, 2024 1

I just now found out about client-side generated hillshade and contour-lines with maplibre GL JS.

This works globally, based on the terrain tiles from aws.
grafik
https://onthegomap.github.io/maplibre-contour/#12.03/46.14026/7.11656

from planetiler.

msbarry avatar msbarry commented on May 18, 2024

Yes! I was thinking the same thing, as well as hillshading polygons derived from the same elevation data. Do you have any background knowledge on generating contour lines?

I did some work on graphhopper with elevation data so I know it shouldn't be too hard to access free public data from Java. I'm not too familiar with generating isolines but it looks like marching squares used by d3-contour is pretty standard?

from planetiler.

markuman avatar markuman commented on May 18, 2024

Do you have any background knowledge on generating contour lines?

Unfortunately not.

from planetiler.

pgassmann avatar pgassmann commented on May 18, 2024

Some interesting and possibly valuable links I collected when looking for global contour lines and hillshade from open data:

Free terrain tiles from aws:

Terrain Tiles:

Generate hillshade

Generate contours

from planetiler.

msbarry avatar msbarry commented on May 18, 2024

Thanks for the pointers! I was about halfway through implementing contour lines in planetiler but ended up just porting the logic to JavaScript since it lets you generate any number of variations on thresholds from one dem source, and built that into maplibre-contour.

Let me know if people still have use cases for server-side generated hillshading/contour lines. Since maplibre now has client side support for those the biggest gap seems like server-generated global landcover.

from planetiler.

wipfli avatar wipfli commented on May 18, 2024

What would be amazing is if you could make a version of the javascript contour lines which works in aws lambda or cloudflare workers. Because I would love to use your contour lines in MapLibre Native but don't know how to get there...

from planetiler.

pgassmann avatar pgassmann commented on May 18, 2024

@wipfli Did you look at the Terradactile demo I linked above? This generates hillshade tiles on lambda. https://github.com/sparkgeo/terradactile-lambda/blob/master/terradactile/terradactile/app.py

I personally prefer provider-independent self-hosted services.
For now I mostly played with tileserver-gl and styles.json to tweak and design map styles. I need to get more familiar with maplibre-gl-js and the plugins.

from planetiler.

CramericaIndustries avatar CramericaIndustries commented on May 18, 2024

Last year I wrote a script which I used to generate contour lines for the whole planet.
https://github.com/CramericaIndustries/vector-terrain-cli

Downside of this script is that the contour lines are overlapping in the border areas of the DEM files.
image

from planetiler.

acalcutt avatar acalcutt commented on May 18, 2024

Right now I am using the https://github.com/onthegomap/maplibre-contour posted above, which makes contour lines based on the terrain raster-dem.

heres a live example of that https://wifidb.net/demo/contours/contour_lines.html#15/32.24408/76.21147/0/60

The nice thing is this produces vector tile lines, which can be styled as you want. It also lets you adjust what levels you want to see without having to generate a whole new set of contour line tiles.

from planetiler.

Related Issues (20)

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.