Re: GPS Coordinates in Tiny SVG

Hi all,

Although I work a lot with maps and like the idea of providing LBS 
services with SVG, I don't think this belongs to the SVG specification. 
I would rather like to see other standards bodies (such as the OGC 
consortium) deal with standardizing access to GPS data values. As long 
as SVG provides access to the DOM via the MicroDOM or the regular DOM 
via a scripting or programming languages you will be able to interact 
with the SVG graphics. F.e. in a JSR 226 enabled device you can read out 
GPS values with Java and change the SVG representation accordingly. You 
also have network interfaces to load data, etc.

The OGC and other standard bodies already standardize(d)s all related 
stuff, such as coordinate reprojection, coordinate systems, etc. (see 
f.e. the OpenLS specification, available at 
http://www.opengeospatial.org/specs/?page=specs) Why reinventing the 
wheel if someone else already deals with it. Why not just make sure the 
several specifications can interoperate with each other?

Lets concentrate on what SVG does best (graphics, interactive GUI) and 
do this first and let the others do what they can do best. SVG is just 
one component of the whole architecture.

Just my two cents ...

Andreas

bz wrote:

>
> Hi
>
> Here is an update for "Enable to use of GPS Coordinates in SVG":
>
> Requirements:
>    long,lat, height above See Level, time of measurement,
>   Status of Satelite Connection
>
> Events:
>       There are some events a GPS modul COULD send to SVG:
>           onGPSChangeStatus,
>           onGPSChangePosition,
>           onGPSsignal,
>           onGPSmove,
>           onGPSConnectionLost
>           onGPSConnectToSatelite
>          ...
>
> Simple Event Model:
>       "onGPSsignal"
>      If the GPS modul receives a signal and calculates position, the 
> Event "onGPSsignal" will be fired.
>      If the GPS modul does not receive a proper signal, there is NO 
> Event (no error event).
>      SVG may loose focus, the onSVGSignal event  is still important 
> for drawing traces.
>    
> Pointer Device  vs. GPS Device
>       GPS can loose connection to satelite
>       GPS fires onGPSsignal in variable time interval. If the GPS 
> modul does not move, the coordinates maybe will not change - but the 
> "onGPSsignal" Event fires. (100% CPU for redraw?)
>
> Not covered:
>      How often the GPS modul fires the event "onGPSstatus" is not defined
>      Privacy Protection
>     The Term "GPS" is not good if Gallileo Signal is received
>
>
>
> This is my conclusion:
> ================
>
> <item title="to be done in SVG or DOM or XML Events or Salzamt">
>
>         evt.gpsLong  (signed dezimal; eample: "-56.234433")
>         evt.gpsLat (signed dezimal; example: "23.3433")
>         evt.gpsHeight (in meter above elipsoid; example "2145.5" (no 
> unit))
>         evt.gpsTime (GMT, timeformat ?????)
>
>        EVENT: onGPSsignal 
> </item>
> (maybe not so important: precision, number of satelites)
> -------------------------------------------------------------------------
> Privacy Protection:
>    There must be a mechanism to prevent giving GPS location to SVG if 
> the User don't want (similar to cookie).
>    If this could be turned on/off using javascript it would be useless 
> -> not in the scope.
>    If GPS data are available they will be used as parameter for 
> Client/Server communication.
>    There is no mechanism to use GPS Data in ClientSide scripting and 
> protect privacy at the same time.
>  
> Done by Javascript (or other languages):
>    o other units like feed
>    o speed, direction
>    o convert to other Coordinate Systems (enjoy the WGS-84 calculation)
>    o statuscheck
>
>
> ========================================================
>
> Here an example how to use GPS in SVG - this is not real ecmaScript - 
> it will not work without changes!!!
>
>
>
>
> <svg onGPSsignal="redrawMap(evt);|setInterval("checkstatus","1000")|" 
> xmlns="http://www.w3.org/2000/svg" version"=1.2 Tiny">
> <!--
> SVG Map that follows GPS coordinates
> description: The center of the map is the GPS position. If GPS 
> coordinates change the map will move and a trace is drawn
> author: Bernhard Zwischenbrugger
> copyright: Public Domain //copy, sell, destroy - do what you want with 
> this
> this is pseudo code (not real javascript / not runable)
> -->
> <script type="text/javascript">
> //globals
> var lastupdate=null; 
> function redrawMap(evt){
>       //onGPSsignal fires only if there is a connection to satelites
>       lastupdate = evt.gpsTime;
>       movinger=svgDocumeng.getElementById('movinger');
>       movinger.setAttribute("translate","translate("+evt.gpsLong 
> *-1+","+evt.gpsLat *-1+")";
>       drawPath(evt);
> }
> function checkstatus(){
>       //pseudo code -  time format not clear -> calculation not possible
>       var now=new Date();
>       if((now - lastupdate) > 10 min){
>             alert("signal lost");
>       }
> }
> function drawPath(evt){
>      var path=svgDocument.getElementById('trace');
>      var points=path.getAttribute('d');
>      points=points.concat(" l "+evt.long+" "+evt.lat);
>     path.setAttribute("d",points);
> }
> </script>
>       <!-- center is  0,0 -->
>       <circle r="20" fill="none" stroke="black"/>
>
>    <!-- move to gps coordinates (redrawMap)-->
>    <g id="movinger">
>
>        <!-- scale your view -->
>       <g translate="scale(5600)" id="scalinger">
>
>             <!-- satelite image - have google map in mind -->
>              <image x="-43.2342342" y="23.2342344" width="0.00100" 
> height="0.00100" xlink:href="http://kh.google.com/kh?v=3&t=trtqttt"/>
>
>             <!-- now the Metadata -->
>              <circle id="new york" x="-43.2323423" y="23.223423" 
> r="0.0000100" fill="none" stroke="red"/>
>              <circle id="vienna" x="-43.2333423" y="23.225423" 
> r="0.0000100" fill="none" stroke="red"/>
>             <path id="trace"/>
>       </g>
> </g>
> </svg>
>
>
> -----
>
> Links:
> ======
>
> GPS Communication format:
> NMEA-0183:
> http://de.wikipedia.org/wiki/NMEA
>
> In German:
> http://www.kowoma.de/gps/zusatzerklaerungen/NMEA.htm
> --------
>
> GoogleMaps
> Version: 2
> http://en.wikipedia.org/wiki/Plate_carr%C3%A9e_projection
> Version: 3
> http://de.wikipedia.org/wiki/Mercator-Projektion
>
> GPS Trace in XML Format:
> http://www.topografix.com/fells_loop.gpx
>
>
> thanks for reading
>
> Bernhard Zwischenbrugger
>
>
>
>


-- 
----------------------------------------------
Andreas Neumann - Institute of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg
CH-8093  Zurich, Switzerland
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/

Received on Wednesday, 31 August 2005 16:27:56 UTC