Comments (10)
@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.
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.
👍 I wonder what needs to go into that, server side component?
from city-roads.
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.
Nice, exposing the API via console first sounds like a great idea. Awesome work!
from city-roads.
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.
@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.
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.
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.
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)
- [Feature Request] Add subway/train lines
- [Feature Request] Display city (area) boundaries
- [Feature Request] Add export HOT 2
- Possible to export/save settings for re-rendering later? HOT 1
- Configure fill?
- Waterways
- [Feature Request] Allow city-roads read local OSM file to avoid mass network request HOT 3
- OSM Error HOT 1
- hhh
- Differing paths in SVG export compared to OSM data
- Bad map loading experience
- OSM Error HOT 1
- OSM Error HOT 1
- OSM Error HOT 1
- OSM Error HOT 1
- OSM Error
- Console API examples do not work anymore?
- OSM Error
- Add City Roads to Taginfo Projects
- OSM Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from city-roads.