Message Boards Message Boards

How to use the newly added vector map styles in the GeoBackground?

A new vector style has been added to Geo Background for Mathematica V13. I have three questions about how to use label objects in vector map:

POSTED BY: Tsai Ming-Chou
4 Replies

The method option "VectorMapRemoveLabels" is an experimental/undocumented option, used internally, and it may change at any time (with a nice documented syntax). I talked a bit about that in my presentation at the WTC 2021.

I see, even when all that data is somehow in the map, the vector format has as main goal to "display" things, more than being able to compute with them. About the elements in the map, even when they are not meant for computing anything (the main goal of the vector format is the nice display), you can extract them from the GeoGraphics output by using the pattern Annotation[primimitives_, {type_, name_, layer_, opts___}, "WolframGeoGraphics"], so you can extract them and play with the ones you want. Something like:

Cases[GeoGraphics[...],
   Annotation[primimitives_, {type_, name_, layer_, opts___}, "WolframGeoGraphics"] :>
     ({type, name, layer} -> primitives), Infinity]

The primitives use the projected space coordinates, and you can convert them using GeoGridPosition and GeoPosition if needed.

I also explained some of this internal structure in my talk at WTC 2020 (which is already published: https://www.wolfram.com/broadcast/video.php?c=104&p=3&v=3233, https://notebookarchive.org/geodata-by-francisco-javier-rodriquez-arias--2020-10-4nd9yhx/ ). Again, all this is part of the internal structure of GeoGraphics, and may get updates or changes in future versions.

The achievements of the R&D team are indeed worthy of the admiration of all users! At the moment, it appears that the function of "VectorMapRemoveLabels" is to remove all types of labels at once. But I still want to ask, is there a way to choose to remove only a certain type of Label (such as only removing all roads or grass)? I think this is a very useful function! However, the premise is that we can list how many types of labels are in the vector map. The above suggestions, I hope to support in future updates~~

POSTED BY: Tsai Ming-Chou

Thanks for your reply~~ My main purpose is to calculate the length of the road, the area of green space, or the number of buildings within a certain distance around the specified coordinates. Previous attempts have been made to use OpenStreet's tagging objects and image recognition. However, after the V13 version released the function of the vector map, I would like to know if there is a more convenient calculation method.

Finally, I would like to ask the method "VectorMapRemoveLabels" mentioned above. Unfortunately, I haven't been able to find instructions for that. Where can I get this information?

POSTED BY: Tsai Ming-Chou
  1. We don't support yet using vector backgrounds as GeoStyling argument when used in the argument of GeoGraphics. A "close" workaround for your specific map could be like:

    Overlay[{GeoGraphics[{}, GeoRange -> Quantity[10, "Kilometers"], 
       GeoRangePadding -> None, 
       GeoCenter -> 
        Entity["City", {"NewYork", "NewYork", "UnitedStates"}], 
       GeoBackground -> "VectorClassic", ImageSize -> {400, 400}], 
      Graphics[{White, Annulus[{0, 0}, {1, 2}]}, 
       PlotRange -> {{-1, 1}, {-1, 1}}, ImageSize -> {400, 400}]}]
    
  2. We only support removing or not all the labels for now:

    GeoGraphics[{}, GeoRange -> Quantity[10, "Kilometers"], 
     GeoRangePadding -> None, 
     GeoCenter -> Entity["City", {"NewYork", "NewYork", "UnitedStates"}], 
     GeoBackground -> "VectorClassic", 
     Method -> {"VectorMapRemoveLabels" -> True}, ImageSize -> {400, 400}]
    
  3. Not sure what you want to try. But being able to customize the elements is something we want to support eventually.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract