On January 13, 2006 08:04 pm, Ampere K. Hardraade wrote:
> The process is trivial.
>
> In each file, there are lines that represent latitude and longitude.
> http://204.108.4.16/d-tpp/0513/00375AD.PDF
>
> The user would first use a program like Inkscape to rename at least four of
> those lines to the latitude and longitude that they represent.  Then,
> he/she would use a custom program to generate a new SVG file that have all
> the vertices of the airport in their proper location.  (Alternately we
> could integrate this "program" into FG, so that the users don't have to go
> through an extra step.)
>
> The program would recongize those latitude and longitude lines by their id
> field.  The correct coordinates of a vertex in the SVG file could then be
> computed by finding the shortest-distance between that vertex and the
> latitude/longitude lines.  It is simple algebra, but we need someone to
> code it.
>
> Ampere

Okay, here is a little example:
http://www.cs.yorku.ca/~cs233144/export_ksfo2.svg

Open the file in a text editor, and search for the strings "lat" and "long".  
You should find the followings:

    <line
       id="lat37:36N"
       y2="1.0930041"
       x2="0.062879607"
       y1="1.0381277"
       x1="-0.015509823"
       inkscape:label="#line3669" />

    <line
       id="long122:24W"
       y2="0.28113425"
       x2="0.18312363"
       y1="0.49137598"
       x1="0.03586068"
       inkscape:label="#line3671" />

    <line
       id="lat37:38N"
       y2="0.5338757"
       x2="0.48925012"
       y1="0.28250575"
       x1="0.13024202"
       inkscape:label="#line3691" />

    <line
       id="long122:23W"
       y2="0.25000599"
       x2="0.54600322"
       y1="0.49837247"
       x1="0.37225437"
       inkscape:label="#line3687" />

So, we know what latitude/longitude the lines represent, and we know the end 
points of each of those lines.  Now, we can use the method shown here:
http://mathcentral.uregina.ca/QQ/database/QQ.09.04/carly1.html
to calculate the latitude and longitude of each vertices in the SVG file.

As I said, simple Algebra. :)

Ampere


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to