Giter Club home page Giter Club logo

Comments (10)

anvaka avatar anvaka commented on July 21, 2024 1

@mlcampbe I've just pushed initial doc here: https://github.com/anvaka/city-roads/blob/master/API.md - please let me know what you think.

from city-roads.

mlcampbe avatar mlcampbe commented on July 21, 2024 1

Anvaka, yes it makes sense and it works but I was hoping to be able to add water boundaries as in request #19. In my small town Roads and RoadStrict don't really do anything and Buildings adds just a few things. But, we have lots of water so was hoping to find a way to add a layer for the water and then color it. Is that coming later or something I'll have to figure out via custom queries?

from city-roads.

msurguy avatar msurguy commented on July 21, 2024

👍 I wonder what needs to go into that, server side component?

from city-roads.

anvaka avatar anvaka commented on July 21, 2024

This is coming very soon (probably end of this week - start of the next week)!

The API will be exposed via console first, and once crystalized we will add UI components to allow non-technical users to interact with it.

from city-roads.

piebro avatar piebro commented on July 21, 2024

Nice, exposing the API via console first sounds like a great idea. Awesome work!

from city-roads.

mlcampbe avatar mlcampbe commented on July 21, 2024

Can you provide a way that we can test the API via the console. What calls/steps would we use to invoke this?

from city-roads.

anvaka avatar anvaka commented on July 21, 2024

@mlcampbe I'm still learning overpass query language, so this may not be correct. I saw your weather project, and tested this with the Decatur coordinates.

Try the following query:

scene.clear(); 

scene.load('', {
  raw: `[out:json][timeout:250];
(
  (
    way[highway](around:7000, {{geocodeCoords:Decatur}}); 
    node(w);
  );
  (
    way[natural='water'](around:7000, {{geocodeCoords:Decatur}});
    node(w);
  );
  (
    way[waterway='river'](around:7000, {{geocodeCoords:Decatur}});
    node(w);
  );
  (
    relation[natural='water'](around:7000, {{geocodeCoords:Decatur}});
    way(r);
    node(w);
  );
);
out skel;`
})

This query should fetch all roads along with water-related ways and relationship within 7km of the Decatur center. I explicitly used around clause here and not the area id, because some water related places are not part of the Decatur area.

from city-roads.

mlcampbe avatar mlcampbe commented on July 21, 2024

That works but it appears to bring up a different "Decatur" than the one in Alabama. There are about 12 or 13 cities named Decatur so I am not sure which one it got but it was not Alabama!! But, I can now see what the correct format should be and can play around with different geocodeCoords settings to see if I can figure it out or use a bbox area.

from city-roads.

mlcampbe avatar mlcampbe commented on July 21, 2024

I was hoping to generate a map very similar to https://i.imgur.com/JuulxyJ.png where the river is the grey color and the major highways are a darker black than the other roads. So far no such luck. Even with the above scene.load... pieces the river is not loading properly. It seems to load as a single line not as all of the grey area in the sample image.

from city-roads.

mlcampbe avatar mlcampbe commented on July 21, 2024

I made some progress and determined that the correct tag should likely be waterway=riverbank based on some testing directly inside of openstreetmap. For example I can see https://i.imgur.com/csAz8JZ.png with the outlined orange a portion of the riverbank. However, when trying to load way['waterway'~'riverbank'] from the dev console it shows https://i.imgur.com/vrmIiIh.png. It appears to be a part of the riverbank edge but does not seem to render all of it.

from city-roads.

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.