Geographical identification location (GeoLocation/GeoTag) in SVG

家住魔仙堡 提交于 2019-12-10 20:35:10

问题


I am wondering how to geotag SVG maps.

My search results

  • Geotags are available in metadata formats such as Exif, XMP and GeoTIFF.
  • There is even a geotag for SMS (based on "geo:" URI)
  • But there is no geotags in SVG standard.
  • And not found Exif/XMB/... in SVG (ExifTool does not support SVG)
  • Not found standard to encode GeoLocation within filename
    (eg: RockwoodRural_geo_50.167958_-97.133185.svg)
  • As GeoLocation can be embedded in XHTML/HTML, and SVG is also XML-based, thus use one of these tricks:

    <meta name="ICBM" content="50.167958, -97.133185">
    
    <meta name="geo.position"  content="50.167958;-97.133185"\>
    <meta name="geo.placename" content="Rockwood Rural"\>
    <meta name="geo.region"    content="ca-mb"\>
    
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
       <geo:Point>
          <geo:lat>55.701</geo:lat>
          <geo:long>12.552</geo:long>
       </geo:Point>
    </rdf:RDF>
    
    <span class="geo">
       <span class="latitude">50.167958</span>
       <span class="longitude">-97.133185</span>
    </span>
    

My questions

  1. Does someone has already GeoTagged an SVG image?
  2. What XML tag to use?
  3. Should I create a specific SVG tag and propose an RFC?
  4. What do you advice?

My specific usage

For information, I am developing on my spare time a website for commons-based maps peer production: Lmap.org. I would like to embed the Geo-Location within the SVG code => The downloaded SVG maps will already contain all the Geo-Location data.

I think SVG GeoTagging could be interesting for maps and building representation, for instance:

  • Paris Ring Road (SVG in Public domain)

  • Greater Vancouver Regional District by TastyCakes on English Wikipedia (Own work) CC-BY-3.0

  • Eiffel tower by Alexandre JABORSKA on Wikimedia Commons (Public domain)


回答1:


The most advanced reference I found is the Dublin Core DCMI-box.

2000 version

The 2000's version was something such :

<Box name="Duchess copper mine">
    <northlimit>-21.3</northlimit>
    <eastlimit>139.9</eastlimit>
    <southlimit>-21.4</southlimit>
    <westlimit>139.8</westlimit>
    <uplimit>400</uplimit>
    <downlimit>-100</downlimit>
</Box>

osgeo.org cite the DClite4G scheme :

 <dct:spatial>
  <Box projection="EPSG:4326" name="Geographic">
    <northlimit>34.353</northlimit>
    <eastlimit>-96.223</eastlimit>
    <southlimit>28.229</southlimit>
    <westlimit>-108.44</westlimit>
  </Box>
</dct:spatial>

They also have a list of RDF

2006 version

The 2006 Dublin Core DCMI-box values used with their generator (click on DCMI-box) suggest the XML syntax as follow :

<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/">

<dcterms:spatial xsi:type="dcterms:Box">
  name=france;northlimit=55;
  eastlimit=10;
  southlimit=44;
  westlimit=-5;
  projection=ESPXYZ;
</dcterms:spatial>

</metadata>

you can naturally change the units.



来源:https://stackoverflow.com/questions/25959608/geographical-identification-location-geolocation-geotag-in-svg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!