« The index of SVG Map Profile 1.0 | メイン | SVG Map data divided into mosaic tegular »

2008年7 月14日 (月)

Geographic coordinates support

This page is English Version of the Japanese article of this blog.

The most important information of SVG Map data is an information for associating a SVG coordinate and geographic coordinates. It is described as a coordinate reference system (Coordinate Reference System) metadata.

The description rule of a SVG Map profile's coordinate reference system metadata is based on SVG1.1 specifications (Geographic Coordinate Systems).
However, in order to cancel the ambiguity of specifications and to simplify a implementation, the profile who performs a new restriction is defined.
A SVG Map profile's data must have a coordinate reference system metadata. It must be described by declaration by the following RDF/XML sentences.

  • Coordinate reference system property
    A coordinate reference system which this documentation uses is declared
    Domain: SVG contents
    Range: A CRS type instance

    Name space of this property :
    This vocabulary is quoted from "Recommended Definition Data for Coordinate Reference Systems and Coordinate Transformations" which OGC recommended in the past.
  • A CRS type instance
    For the moment, only a following CRS type instance is recommended.

    Generally this resource is called WGS-84.
    However, it is a two-dimensional coordinate system, the first parameter (X) of that is a Longitude and the second parameter (Y) is a Latitude. And the unit is a "degree", respectively.
    This coordinate reference system is equivalent to "CRS:84" (Annex B3) which OGC defined for WMS1.3.0.

    Notes 1: We searched for URIs for
    "CRS:84". However, the appropriate one was not able to be found. Although we barely discovered the URN "urn:ogc:def:crs:OGC:1.3:CRS84", a clear declaration of that was not able to be found out. Then, we decided to organize purl(persistent URL) for "CRS:84".
    Notes 2: On the other hand, "EPSG:4326" is known as one of the coordinate reference systems of WGS-84. However, the first parameter (X) of that is a Latitude and the second parameter (Y) is a Longitude.  That is, "CRS:84" which SVG Map uses has a reverse sequential order of a parameter compared with it.
    Notes 3: purl is URIs which can be accessed by a web browser. The document for "CRS:84" can obtain from this uniform resource locator (http://purl.org/crs/84).
    Restriction of CRS is because it is the advantage that an interoperability can be improved, making the implementation to a user terminal easy by setting CRS to one.  For example, when superimposing two or more maps, it becomes unnecessary to take into consideration the difference in a coordinate reference system as a matter of fact. WGS-84 coordinate system may be used by the geographic information of the majority on an internet. Furthermore, it is also a native coordinate reference system of GPS which many portable terminals are implementing. Consequently, the inconvenience by this restriction will not occur in a majority of applications.
  • A SVG coordinates conversion property
    The transformation between the coordinate value of a SVG contents and the coordinate value of a geographical coordinate reference system is given.
    Domain:  CRS type instance
    Range:   Text which can be used with a SVG transform property (it is generalizable as an affine transformation parameter)

    The transformation is as follows.
      SVG_X: X coordinate of a SVG data
      SVG_Y: Y coordinate of a SVG data
      Geo_X: The first parameter of geographic coordinates (By restriction of a CRS type instance, it is a Longitude.)
      Geo_Y: The second parameter of geographic coordinates (By the restriction of a CRS type instance, it is a Latitude.)
      a , b , c , d , e , f:  The applicable values of parameters(SVG transform(a,b,c,d,e,f) )

      SVG_X = a * Geo_X + c * Geo_Y + e
      SVG_Y = b * Geo_X + d * Geo_Y + f

    When this properties is not declared, it is considered that that value is matrix (1, 0, 0, 1, 0, 0). 
  • Map projection for SVG Map
    The geographic coordinate transformation property of SVGMap is limited only the first affine transformation. Therefore, the projection that can be used with SVG Map is limited to the equirectangular projection (And, Plate Caree that is the derived form that takes the standard parallel on the equator).
    It is also possible to use the drawing with non-diagonal section of the affine transformation. (It corresponds to a drawing that rotated equirectangular projection. )
    This limitation will offer a practicable drawing in most use cases. However, it might be inconvenient in the map of the high latitude region etc.  However, the function built into beforehand by the rendering system of SVG can be used and because it is a simple linear transformation, implementation on user agent is facilitated. As a result, the scalability (especially, small terminal) will be improved.
  • Example
    <?xml version="1.0" encoding="UTF-8"?>
    <svg xmlns="
    http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <circle cx="258.1401" cy="185.1558" r="10.0" stroke="none" fill="green"/>
    In this example, the metadata of the geographic coordinate reference system is expressed in the following RDF graphs in Notation 3.
    <This SVG Document> crs:CoordinateReferenceSystem http://purl.org/crs/84.
    <http://purl.org/crs/84> svg:transform "matrix(15.3631,0.0,0.0,-18.6994,-1889.2916,849.9202)".
    The parameters of the SVG coordinate transformation property are as follows.
    And, geographic coordinates that correspond to SVG coordinates (258.1401,185.1558) at the center of < circle > figure become as follows.
    258.1401 =  15.3631 * Geo_X - 1889.2916
    185.1558 = -18.6994 * Geo_Y + 849.9202

    Geo_X(Longitude) = 139.7694
    Geo_Y(Latitude) =  35.5500



Listed below are links to weblogs that reference Geographic coordinates support :