About Carte_zone_monde_rdf:
“An authoring interface to produce location information”

By Cédric Kiss, Florent Mailland, supported by Charles McCathieNevile.
Project SWAD-Europe at W3C, $Id: readme_carte_zones_monde_rdf.html,v 1.17 2004/09/22 14:12:34 charles Exp $.

Below is a static screenshot taken from the script. You can see IATA and ICAO airports (red and yellow dots, resp.) and some low-resulotion zones (orange polygons).
A screenshot showing some low-resolution zones, here roughly represented as orange polygons, and some airports.
See more screenshots, taken along the development process.

Introduction

Carte_zone_monde_rdf is an SVG client-side script intended to help working with geographic information. It can

The zone can be drawn by a geometric polygon on a map, using latitude/longitude co-ordinates.
The uses RDF for the description of these zones, airports, and actors. Some functionalities were added now, you can also get RDF information about the geographic zone you selected as the location latitude/longitude co-ordinates, nearest airport and distance between the selected point and the airport.

Feedback is always welcome and appreciated, and should be sent to either the RDF Interest Group or the Geowanking list (more specifically dedicated to geospatial information).

How to use it?

This RDF output can look like that:

0100        <rdf:RDF>
0101                <!-- Situation des personnes par rapport a ta position actuelle -->
0102                <Person>
0103                        <name>Alice Walter</name>
0104                        <sameZoneType xml:lang="fr">pays</sameZoneType>
0105                        <sameZoneName xml:lang="fr">France</sameZoneName>
0106                </Person>
0107                <Person>
0108                        <name>Bob Smith</name>
0109                        <sameZoneType xml:lang="fr">continent</sameZoneType>
0110                        <sameZoneName xml:lang="fr">Europe</sameZoneName>
0111                </Person>
0112        </rdf:RDF>

Files used

The files containing the zone information contain a URL, a title, along with the co-ordinates of the outlines. They can look like that:

1100        <?xml version="1.0" encoding="UTF-8"?>
1101        <rdf:RDF
1102                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1103                xmlns:area="http://ckiss.net/machin/area-ns#">
1104        
1105                <area:Area>
1106                        <area:name>Arizona</area:name>
1107                        <area:polygons>
1108                                <area:Polygon>
1109                                        <area:center>
1110               -112.353981         33.391022
1111                                </area:center>
1112                                <area:points>
[..]               -109.046196         31.331800
               -109.300354         31.334017
               -109.789291         31.332031
               <!-- (I stripped the co-ordinates enumeration) -->
               -109.048943         31.806059
               -109.045547         31.508570
               -109.046196         31.331800
1200                                        </area:points>
1201                                </area:Polygon>
1202                        </area:polygons>
1203                </area:Area>
1204        </rdf:RDF>


The files containing the RDF vocabulary contain a Description of the resource look like:
<rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:NS0='http://www.w3.org/2001/sw/Europe/200306/geo/vocab/termes#'
xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'
>
 <rdf:Description rdf:about='#pays'>
   <rdfs:label>La France</rdfs:label>
   <rdf:type rdf:resource='http://www.aktors.org/ontology/portal#Geographical-Region'/>
   <rdfs:comment>Le pays lui-même - La France, y compris les DOM-TOM</rdfs:comment>
 </rdf:Description>
 <rdf:Description rdf:about='#PACA'>
   <!-- PACA est en france -->
   <NS0:zone rdf:resource='#pays'/>
   <rdfs:comment>Provence Alpes Cote d'Az...</rdfs:comment>
   <rdfs:label>PACA</rdfs:label>
   <!-- c'est un region, donc du type Geographic-region (parce que tout de type    region l'est) mais ca ne fait pas mal de le dire aussi -->
   <rdf:type rdf:resource='#region'/>
   <rdf:type rdf:resource='http://www.aktors.org/ontology/portal#Geographical-Region'/>
 </rdf:Description>
   <!-- on defini une classe pour les regions de France -->
 <rdf:Description rdf:about='#region'>
<!-- c'est un type de region geographique -->
   <rdfs:subClassOf rdf:resource='http://www.aktors.org/ontology/portal#Geographical-Region'/>
<rdfs:comment>Region</rdfs:comment> <rdfs:comment>Une region administrative de la France, genre PACA</rdfs:comment> </rdf:Description> </rdf:RDF>

Implemented Functions

Looking for particular people:

There is a complete list of the 70-odd functions defined (not all of them are used). Here are some of the functions explained a bit:

initPays()
Load every regions files containing countries outlines
initFoaf()
Load some foaf informations files. These are loaded in real time, from the files referred to in scutterTrim.rdf - there is a larger list of files at scutter_20030806.xml but it takes days to load and most of the information you get wouldn't be relevant. If you edit this function you can change where it loads FOAF files from.
initAirport()
Load from the file airports.rdf all the co-ordinates and information about airports
formateGeoResultsEnRdf(regions, selected_co-ordinates, nearestAirport_info)
Generate an RDF output about the regions the selected point belong and about the nearest airport found
formateDataResultsEnRdf(arrayResult)
do the same but with foaf actors found near the geographic zone selected
getNearestAirport(latitud, longitud)
calculate the nearest airport from the lat/long co-ordinates given in parameter --note this is being changed in the testVersion
convertCoordToDec(latitud, longitud)
convert co-ordinates in degrees-minutes[-seconds] to degrees in decimal
calcDistance(latitud_a, longitud_a, latitud_b, longitud_b)
calculate the distance in kilometer between the points a and b
getFoafActorInfo(foaf_file)
get the information about actors contained in foaf_file
locateMousePoint(evt)
Find the point where the click happened, taking into account zoom and pan

Things to do

Known problems

Translation

Some SVG commands are displayed in French. So maybe you could want a translation of these:


Valid XHTML 1.1?
Last update: $Date: 2004/09/22 14:12:34 $ by $Author: charles $