Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #31428

    xarly89
    Participant

    Basically my question is if there are maps that only contain the contour data in it, instead of all other data. Or do I have to generate them myself using the process described here https://www.openandromaps.org/en/oam-forums/topic/reproducing-map-creation-process-2 ?

    Does anybody know if it is feasible to generate my own vector PBF data with the contour lines in it? To be used with other maps libraries. Basically I’m willing to take the effort that it takes to process the whole world, using the information I’ve see here https://www.openandromaps.org/en/oam-forums/topic/reproducing-map-creation-process-2 but instead of creating Mapsforge maps that include the contour data, I’d like to use osmosis to create the osm pbf file that has the contour data, and then convert it to MBTiles or PBF format to be used with the VTM library as an online source for contour.

    Thank you in advance!

    You have here a wonderful project, to be honest. It’s amazing how much information is described to use the maps as you provide them and to even generate them :)

    #31435
    ChristianK
    ChristianK
    Keymaster

    Hi,

    If you want to create osm.pbf contourdata then
    phyghtmap is your friend.

    http://katze.tfiu.de/projects/phyghtmap/phyghtmap.1.html
    https://wiki.openstreetmap.org/wiki/Phyghtmap

    Here is the additional FREE LIDAR Dataset from @sonny covering parts of Europe
    https://data.opendataportal.at/dataset/dtm-europe

    Well, its possible to create mapsforge maps with contourlines only, however I never did it.
    You just have to create the osm file and feed the mapsforge writer.
    If these maps are usefull depends weather the APP is able to render transparent Vector maps.

    Best regards
    Christian

    #31437

    xarly89
    Participant

    It’s indeed possible to display tiles with transparent background in VTM and Mapsforge. I already do for other tiles.

    Alright, so I only have to generate the OSM.PBF, and then generate the .map files with Osmosis. Sounds quite simple :)

    By the way, is it possible to not convert the maps in the OpenAndroMaps format (by not using the tag transformation) and still generate the .map files, with the same information as it’s in VTM maps, along with the contour lines? I’d rather stick to my current theme, which is based on the default VTM one. It’s a bit messy and tiring to fully convert it to be adapted to OpenAndroMaps.

    Basically, I want to stick with the VTM vector maps, but I need to generate them with the contour data. So I need to:

    1. – use phyghtmap for that (did some tests yesterday),
    2. – then I need to generate a OSM.PBF with that,
    3. – and then merge it along with the OSM.PBFs I have,
    4. – to finally be able to generate the Mapsforge vector maps that contain the contour data.

    That sounds logical and possible?

    • This reply was modified 3 weeks ago by  xarly89.
    #31499
    ChristianK
    ChristianK
    Keymaster

    By the way, is it possible to not convert the maps in the OpenAndroMaps format (by not using the tag transformation)

    Of cause, but these maps are no longer compatible with OAM-Thems.

    – use phyghtmap for that (did some tests yesterday),
    – then I need to generate a OSM.PBF with that,
    – and then merge it along with the OSM.PBFs I have,
    – to finally be able to generate the Mapsforge vector maps that contain the contour data.
    That sounds logical and possible?

    Thats the way I do this.

    Best regards
    Christian

    #31509

    xarly89
    Participant

    Alright, I’ve got my first error here. I tried the whole process without simplifying ways, and while it produced quite decent results, there was an error I attribute to not simplifying ways (perhaps wrongly, we will see about that later).

    So now I’ve downloaded Osmos 0.39, which I understood is the version I need for simplifying ways. And I’ve got the following error:

    [/crayon]

    The catalonia_contours.osm file, was produced by a long combination of merging all the OSM.PBF that I got with phyghtmap. And as I said earlier, this was enough for generating a map using the tag-transform and tag-mapping to generate the map from Catalonia including contours, that has been correctly (except one issue with contour lines being weirdly drawn in a given area of the map) styled and drawn on VTM with Elements theme.

    Why do I get the above error? I have downloaded Osmosis 0.39 from here: https://dev.openstreetmap.org/~bretth/osmosis-build/osmosis-0.39.zip

    #31511
    ChristianK
    ChristianK
    Keymaster

    You need the plugin ##.jar and copy it to ../osmosis/lib/default
    Iv attached the plugin for you

    BTW, I use epsilonMeters=3

    #31518

    xarly89
    Participant

    Great! Downloaded and placed in that directory. Now the previous error went away, but a new one has appeared:

    [/crayon]

    It seems I’m missing the com/vividsolutions/jts/geom library, which it’s known to me, since I am using it in a few other projects for reading Geometries in GeoJson format.

    Is it as simple as downloading the com/vividsolutions/jts JAR and placing it in the same folder than the previous JAR? I’ve downloaded it from here: https://repo1.maven.org/maven2/com/vividsolutions/jts/1.13/

    And now when I run the command and it seems to have generated the simplified contours OSM file. Gonna try with the rest of the process :)

    1 user thanked author for this post.
    #31520

    xarly89
    Participant

    Ok, so the generation of the .map with contours has finished, and I’ve been able to view the results using the VTM library. It has reduced, for the Catalonia map, 3MB the total size of the map, which is great. Basically the contours added about 25MB of space to the map file, which is totally affordable for what the hikers are going to get.

    However, there’s an issue I expected to be solved, but it seems it has absolutely nothing to do with the simplification of the contour lines. I have posted 2 screenshots, and as you can see in one of them the contour lines look just beautiful. And this is the case for most of the map. BUT, in the other screenshot, you can observe there’s a weird effect that makes contour lines from a far away place to be connected by a straight line. And it’s not only one line, there are many.

    Since the generation of the map is quite straightforward, I guess my problem will be in the generation of the contour lines, by incorrectly using phyghtmap. So here it’s what I used to achieve the contour lines:

    For Catalonia only:
    phyghtmap –polygon catalonia.poly -o catalonia –source=view3,srtm3 -j 12 –pbf

    For Spain:
    phyghtmap –polygon spain.poly -o spain –source=view3,srtm3 -j 12 –pbf

    By the way, this didn’t happen when I generated the contour lines of the whole Spain. Quite curiously :S

    #31551
    ChristianK
    ChristianK
    Keymaster

    Hmmm,

    Add these parameters to phyghtmap

    --max-nodes-per-way=200 --start-node-id=10000000000 --start-way-id=10000000000

    #31566

    xarly89
    Participant

    That worked ChristianK :) Thank you so much for the help and guidance.
    Will jump to the other post where we are talking about the issue with the simplification of ways and the elimination of the bounds node.

    1 user thanked author for this post.
Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.