I have a relation (https://www.openstreetmap.org/relation/295355) I want to load into Maperitive. I'm really struggling though. At the link above, I use the Download XML button and manage to save a file in .osm format. I remove the XML tag at the top of the OSM file, because that's the only way Maperitive will recognize and open the file. i.e. see below. I load it to Maperitive (v2.4.3), seemingly successfully. It's listed and gold-starred in the Map Sources lists. But for the life of me, I can't get the boundary to display. What am I missing? I've read something about topmost-layer property, but this thing isn't too user friendly...
asked 30 Oct '20, 17:02 mike_302 |
This XML file does not appear to have any style information associated with it. The document tree is shown below. <osm version="0.6" generator="CGImap 0.8.10 (3607142 spike-06.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/"> <relation id="10249598" visible="true" version="4" changeset="143225600" timestamp="2023-10-27T18:59:32Z" user="ramseraph1" uid="13327813"> <member type="way" ref="741276431" role="outer"/> <member type="way" ref="741917457" role="outer"/> <member type="way" ref="741311834" role="outer"/> <member type="way" ref="741311788" role="outer"/> <member type="way" ref="741311817" role="outer"/> <member type="way" ref="741311815" role="outer"/> <member type="node" ref="245747076" role="admin_centre"/> <tag k="admin_level" v="6"/> <tag k="boundary" v="administrative"/> <tag k="<img alt=" alt="" text"="" src="http://Mehsi,Bihar.com"/>name" v="Mehsi"/> <tag k="town" v="Kaswa Mehsi"/> <tag k="type" v="boundary"/> </relation> </osm>
permanent link
This answer is marked "community wiki".
answered 16 Dec '23, 21:30 Motiharicity |
I know nothing about Maperative, but if that is the entirety of your OSM file you appear to be missing the actual geometry. Relations reference other geometry types, so unless you have included the referenced elements in your file the software will have very little to go on. See this page for more information about the three element types that are used within OSM. If you export the result of for example this Overpass query as and load that into Maperative, do you get the desired effect? answered 31 Oct '20, 00:09 InsertUser Well, it's the entirety of the Relation, as far as I understand these things (which is not very much...) Maperitive initializes with an OSM Map (OSM Mapnik). Then, as I understand the mechanics, you load in additional Map data (like Relations). My reference is the Loading Map Data heading on this page: http://maperitive.net/docs/TenMinutesIntro.html
(31 Oct '20, 09:26)
mike_302
Relations have no geometry of their own, so yes it is all of the relation, but unless you download the geometry it refers to ( The xml generated by the query I linked is 1660 lines long rather than the 47 lines for the relation itself as it includes all of the members. If you follow the link I provided and select Run then Export > download/copy as raw OSM data, does the resulting file load correctly in Maperative?
(31 Oct '20, 10:21)
InsertUser
|