Skip to content
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

[Feature Request] Allow city-roads read local OSM file to avoid mass network request #61

Open
LaoshuBaby opened this issue Jul 17, 2022 · 3 comments

Comments

@LaoshuBaby
Copy link

LaoshuBaby commented Jul 17, 2022

For a large city the data maybe larger than 100MB, for designer or osm-mapper live in awful internet connection, load city correctly is almost a very hard thing. And if the web browser down, everything need to restart.

If this program can load local .osm file, it will be great for local cache. User can make extract by OverpassAPI query or other method. In addition, this will reduce the burden on OverpassAPI, allowing it to serve more users.

@anvaka
Copy link
Owner

anvaka commented Jul 17, 2022

I love this idea! When I query the roads I expect certain format in response. Would it be possible to share a few OSM files for me to make sure I can support them?

@LaoshuBaby
Copy link
Author

I love this idea! When I query the roads I expect certain format in response. Would it be possible to share a few OSM files for me to make sure I can support them?

I'm really sorry that I completely forgot about this Issue. I didn't remember it until today's weekly OSM reported on your work again.

I recalled the scene when I received your reply two years ago. At that time, I was not quite clear about how your query worked. (Then, unfortunately, it seems that I fell asleep next to the computer and forgot about this matter.) But now, after consulting what you wrote in API.md, it seems that you retrieved a geojson (not sure if it's standard).

raw: `[out:json][timeout:250];

raw: `[out:json][timeout:250];

Overpass also supports exporting in standard OSM format, just change json to xml.

I may have misunderstood at that time, thinking that you needed OSM data for testing purposes (but even if you export a random city, it should be at least 10MB or more (Can't directly attach on GitHub anymore), and it is difficult to find small enough test cases).

Therefore, now it seems that I suggest you read the documentation on API 0.6 on the OSM Wiki.

@LaoshuBaby
Copy link
Author

Of course, if you really need a specific file to test with...

This is a road network extract from a very small area in OpenGeofiction (don’t worry, its data format is exactly the same as OSM), less than 1MB, which may meet your needs.

TESTCASE_OpenGeofiction_anvaka_city-roads.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants