How does OpenStreetMap store it's map data?

I'm woking in AutoCAD at work and I'm getting the feeling that if I were to store the OSM map data in AutoCAD it would be a huge file, yet the files I download in CoMaps are small with regards of how much data they contain.

#AskFedi #OSM #OpenStreetMap #AutoCAD #CAD #CoMaps

@spacebug I mean, you probably don't need all the data right? just a section of it?
Any idea what file format you want?

I think a lot of people use Qgis for this

https://wiki.openstreetmap.org/wiki/Converting_map_data_between_formats
shows several tools, including qgis to do this.

So you choose your area in qgis, then export to xdf

Converting map data between formats - OpenStreetMap Wiki

@spacebug I think you can also for example download an entire country or region of a country by downloading the pbf file from here:
https://download.geofabrik.de/
And then using something like this
https://mygeodata.cloud/converter/osm-to-autocad
to then convert it to autocad
Download OpenStreetMap for OpenStreetMap Data Extracts | Geofabrik Download Server

Download OpenStreetMap data for OpenStreetMap Data Extracts for self-hosting or data analysis. OSM PBF and Shapefiles available.

Geofabrik Download Server
@thibaultmol oh I'm actually not in the process of doing something like editing the data, it's was just more of a technical question of how the data is stored.
Thanks anyway.
@spacebug Okay, there’s a lot to unpack here, and it might get lengthy. In short, you’re dealing with very different types of data. AutoCAD DWG (which is clunkier than DXF) isn’t really similar to how GIS information is stored, as it’s more like a JSON set.
@kkavee hum OK. To be fair I don't really know how AutoCAD stores it's data either, but it would seem that the same amount of data would be needed to a be stored?
Like a building or a road must have a few data points (x,y) and then maybe lines with a starting point and an ending point?

@spacebug a simple polyline in DWG is not just “a list of points.” It’s a structured object that stores explicit geometry, plus a ton of extra baggage

If you want none of the entire AutoCAD drawing environment, there is DXF = text-based interchange format. Think of DXF as the “CSV of CAD.”

@kkavee Yeah I've been saving to DXF sometimes for some purposes.
OK I didn't know that a polyline had such overhead, but now that you mention it, yeah it has things like z value, colour and more. I'll play around with it at work tomorrow.
Thanks 😃