Skip to content

How exactly are subpolygon links and fills supposed to work? #59

@dead-claudia

Description

@dead-claudia

Using this example from the high level API:

<feature>
  <geometry>
    <multipolygon>
      <polygon>
         <a href="https://example.org/canada/mapml">
           <coordinates class="f72 outer">59.5303058 74.7915903 59.7266984 74.7479857 … 76.1838491 <span class="noline">67.5 76.1894504 67.5 76.7412725 67.5 77.0079535</span> 67.2115912 76.9522523 … 74.727385 59.5303058 74.7915903</coordinates>
         </a>
         <coordinates class="f72 hole">54.8127632 73.6650796 54.9487273 73.7169245 55.1327595 73.7134911 54.940487 73.6654229 54.8127632 73.6650796</coordinates>
       </polygon>
       <polygon>
         <coordinates class="f72 outer">58.7310016 75.895097 59.219923 75.946598 59.240523 75.995353 58.8079106 75.925311 58.7310016 75.895097</coordinates>
       </polygon>
     </multipolygon>
   </geometry>
   <properties>
     <table>
       <thead>
         <tr><th>Property name</th><th>Property value</th></tr>
       </thead>
       <tbody>
         <tr><th>scalerank</th><td>0</td></tr>
         <tr><th>featurecla</th><td>Admin-0 country</td></tr>
         <tr><th>labelrank</th><td>2</td></tr>
         <tr><th>sovereignt</th><td>Canada</td></tr>
         … 
         <tr><th>subregion</th><td>North America</td></tr>
      </tbody>
     </table>
   </properties>
</feature>

Most mapping datasets don't let you add metadata to links like that. I also was exploring possibly proposing simplifying <geometry> sections into just a series of line-only SVG paths within geometry sections, but this edge case led me to a very subtle question: how are link and fill regions defined for subsequences of 1-2 coordinate pairs?

3+ coordinate pairs is relatively simple: treat it like a nested polygon. Zero is also easy: style nothing. But 1 and 2 are non-obvious.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions