From 0db95a8c8324b386d7038056a80e599d193880ae Mon Sep 17 00:00:00 2001 From: bodenseepingu Date: Sat, 5 Jan 2008 18:21:30 +0000 Subject: [PATCH] added gpx2navit git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@718 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/src/tools/gpx2navit_txt/AUTHORS | 9 + navit/src/tools/gpx2navit_txt/COPYING | 339 ++ navit/src/tools/gpx2navit_txt/ChangeLog | 21 + navit/src/tools/gpx2navit_txt/INSTALL | 17 + navit/src/tools/gpx2navit_txt/Makefile.am | 27 + navit/src/tools/gpx2navit_txt/NEWS | 64 + navit/src/tools/gpx2navit_txt/README | 117 + navit/src/tools/gpx2navit_txt/TODO | 1 + navit/src/tools/gpx2navit_txt/config.guess | 1453 ++++++ navit/src/tools/gpx2navit_txt/config.sub | 1566 +++++++ navit/src/tools/gpx2navit_txt/configure.ac | 46 + navit/src/tools/gpx2navit_txt/depcomp | 423 ++ .../src/tools/gpx2navit_txt/develop/structures.gif | Bin 0 -> 39033 bytes navit/src/tools/gpx2navit_txt/install-sh | 251 + navit/src/tools/gpx2navit_txt/man/Makefile.am | 2 + navit/src/tools/gpx2navit_txt/man/gpx2navit_txt.1 | 103 + navit/src/tools/gpx2navit_txt/missing | 336 ++ navit/src/tools/gpx2navit_txt/mkinstalldirs | 99 + navit/src/tools/gpx2navit_txt/pinatest2.gpx | 4790 ++++++++++++++++++++ navit/src/tools/gpx2navit_txt/src/Makefile.am | 26 + navit/src/tools/gpx2navit_txt/src/elementControl.c | 225 + navit/src/tools/gpx2navit_txt/src/emess.h | 32 + navit/src/tools/gpx2navit_txt/src/errorcode.h | 22 + navit/src/tools/gpx2navit_txt/src/geod_for.c | 108 + navit/src/tools/gpx2navit_txt/src/geod_inv.c | 73 + navit/src/tools/gpx2navit_txt/src/geod_set.c | 95 + navit/src/tools/gpx2navit_txt/src/geodesic.h | 51 + navit/src/tools/gpx2navit_txt/src/gpx2navit_txt.h | 272 ++ navit/src/tools/gpx2navit_txt/src/main.c | 389 ++ navit/src/tools/gpx2navit_txt/src/misc.c | 344 ++ navit/src/tools/gpx2navit_txt/src/parser.c | 125 + navit/src/tools/gpx2navit_txt/src/setmeta.c | 54 + navit/src/tools/gpx2navit_txt/src/setpath.c | 241 + navit/src/tools/gpx2navit_txt/src/setwpt.c | 52 + navit/src/tools/gpx2navit_txt/src/utils.c | 199 + 35 files changed, 11972 insertions(+) create mode 100644 navit/src/tools/gpx2navit_txt/AUTHORS create mode 100644 navit/src/tools/gpx2navit_txt/COPYING create mode 100644 navit/src/tools/gpx2navit_txt/ChangeLog create mode 100644 navit/src/tools/gpx2navit_txt/INSTALL create mode 100644 navit/src/tools/gpx2navit_txt/Makefile.am create mode 100644 navit/src/tools/gpx2navit_txt/NEWS create mode 100644 navit/src/tools/gpx2navit_txt/README create mode 100644 navit/src/tools/gpx2navit_txt/TODO create mode 100644 navit/src/tools/gpx2navit_txt/config.guess create mode 100644 navit/src/tools/gpx2navit_txt/config.sub create mode 100644 navit/src/tools/gpx2navit_txt/configure.ac create mode 100755 navit/src/tools/gpx2navit_txt/depcomp create mode 100644 navit/src/tools/gpx2navit_txt/develop/structures.gif create mode 100755 navit/src/tools/gpx2navit_txt/install-sh create mode 100644 navit/src/tools/gpx2navit_txt/man/Makefile.am create mode 100644 navit/src/tools/gpx2navit_txt/man/gpx2navit_txt.1 create mode 100755 navit/src/tools/gpx2navit_txt/missing create mode 100755 navit/src/tools/gpx2navit_txt/mkinstalldirs create mode 100644 navit/src/tools/gpx2navit_txt/pinatest2.gpx create mode 100644 navit/src/tools/gpx2navit_txt/src/Makefile.am create mode 100644 navit/src/tools/gpx2navit_txt/src/elementControl.c create mode 100644 navit/src/tools/gpx2navit_txt/src/emess.h create mode 100644 navit/src/tools/gpx2navit_txt/src/errorcode.h create mode 100644 navit/src/tools/gpx2navit_txt/src/geod_for.c create mode 100644 navit/src/tools/gpx2navit_txt/src/geod_inv.c create mode 100644 navit/src/tools/gpx2navit_txt/src/geod_set.c create mode 100644 navit/src/tools/gpx2navit_txt/src/geodesic.h create mode 100644 navit/src/tools/gpx2navit_txt/src/gpx2navit_txt.h create mode 100644 navit/src/tools/gpx2navit_txt/src/main.c create mode 100644 navit/src/tools/gpx2navit_txt/src/misc.c create mode 100644 navit/src/tools/gpx2navit_txt/src/parser.c create mode 100644 navit/src/tools/gpx2navit_txt/src/setmeta.c create mode 100644 navit/src/tools/gpx2navit_txt/src/setpath.c create mode 100644 navit/src/tools/gpx2navit_txt/src/setwpt.c create mode 100644 navit/src/tools/gpx2navit_txt/src/utils.c diff --git a/navit/src/tools/gpx2navit_txt/AUTHORS b/navit/src/tools/gpx2navit_txt/AUTHORS new file mode 100644 index 0000000..06a46c2 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/AUTHORS @@ -0,0 +1,9 @@ +AUTHORS +======== +Toshihiro Hiraoka + maintainer +Petter Reinholdtsen + bug fix, debian package and advices + +bodenseepingu bodenseepingu at user.sourceforge.net + for modifications towards gpx2navit_txt diff --git a/navit/src/tools/gpx2navit_txt/COPYING b/navit/src/tools/gpx2navit_txt/COPYING new file mode 100644 index 0000000..514d6c7 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/navit/src/tools/gpx2navit_txt/ChangeLog b/navit/src/tools/gpx2navit_txt/ChangeLog new file mode 100644 index 0000000..431aa18 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/ChangeLog @@ -0,0 +1,21 @@ +0.1 new version gpx2navit_txt + +0.69 + by Petter Reinholdsen + - Add configure option "--enable-coverage". + - Add few check targets. + - Patch for compile warning in DBFWriteAttribute(). + - Patch for compile warning in createParseData(). + by Toshihiro Hiraoka + - Bug (Debian Bug #292514: Segfaults when called only with -v) fix + - Delete few unused functions from utils.c + +0.68-1 +====== + by Petter Reinholdtsen + - New debian package gpx2shp_0.68-1_i386.deb. + - Update debian releted files. + debian/watch, control, changelog + - Delete src/configure.ac. + - Delete libz check entry from configure.ac. + diff --git a/navit/src/tools/gpx2navit_txt/INSTALL b/navit/src/tools/gpx2navit_txt/INSTALL new file mode 100644 index 0000000..b5dbb9e --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/INSTALL @@ -0,0 +1,17 @@ +Requirements +============== +- proj >ver4.0 +- expat >ver2.0 +- gpsbabel If you want to convert from GPS to shp directory but the + future is not stable yet. + +Installation +============== +It's not special. Just type below like others. + + ./configure + make + su + make install + +gpx2navit_txt image will be at /usr/local/bin. diff --git a/navit/src/tools/gpx2navit_txt/Makefile.am b/navit/src/tools/gpx2navit_txt/Makefile.am new file mode 100644 index 0000000..05f1ce1 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/Makefile.am @@ -0,0 +1,27 @@ +SUBDIRS = src man + +EXTRA_DIST = gps2shp pinatest2.gpx debian develop + +debian-dist: + dpkg-buildpackage -rfakeroot -d -tc -us -uc + +CLEANFILES = \ + pinatest2_wpt.shx \ + pinatest2_wpt.shp \ + pinatest2_wpt.dbf \ + pinatest2_trk.shx \ + pinatest2_trk.shp \ + pinatest2_trk.dbf \ + pinatest2_rte.shx \ + pinatest2_rte.shp \ + pinatest2_rte.dbf \ + pinatest2_meta.txt + +GPX2SHP=src/gpx2shp +check: $(GPX2SHP) + $(GPX2SHP) || true + $(GPX2SHP) --version + $(GPX2SHP) -s pinatest2.gpx + $(GPX2SHP) -e pinatest2.gpx + $(GPX2SHP) -p pinatest2.gpx + $(GPX2SHP) -v pinatest2.gpx > /dev/null diff --git a/navit/src/tools/gpx2navit_txt/NEWS b/navit/src/tools/gpx2navit_txt/NEWS new file mode 100644 index 0000000..7bd1673 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/NEWS @@ -0,0 +1,64 @@ +0.69 +==== + by Petter Reinholdtsen + - Add compile check options + - Compile warning fixes + by Toshihiro Hiraoka + - Bug fix + +0.68-1 +====== + by Petter Reinholdtsen + - Add debian files + by Susumu Murakami + - RPM package for Vine 3.1 + +0.68 +==== + by Toshihiro Hiraoka + - Change XML parser from libxml2 to expat for big file support + - Remake almost all strucutes. + - Rewrite almost all sources. + - Add three path check options --min-points, --min-length and + --min-time to reduce the noise. + - Add -b, --basix-columns option + - Add -g, --gpxline option + - Add -f, --fast option + - README + - AUTHORS + - Change comment style to javadoc style. + - Structures flow + - Error code + +0.65-1 +====== + by Petter Reinholdtsen + - Add some debian missing files. + - Added config.sub and config.guess. + - debian package available now! + + by Toshihiro Hiraoka + - Stop to use strange version number. + +0.65a +===== + by Petter Reinholdtsen + - Add configure script etc. + - Get rid of some warnings about loosing the 'const'-ness of the + variable. + - Remove unused include . + - Add include to find prototype for geod_set(). + - Fix handling of output filename, to make sure it handles + './foo.gpx' (used to give random filename). + - Correct the prototype of closeFiles(). + - Add files in debian/ to make debian package. This is just a + framework, and need more work. The package description and a lot + of the support files are from the dh-make package, and should be + edited or removed. To build the package, run debuild from the + devscripts package. + - Solve some memory leaks and complaints. + + by Toshihiro Hiraoka + - Restruct directory + - Add many prototypes etc. + diff --git a/navit/src/tools/gpx2navit_txt/README b/navit/src/tools/gpx2navit_txt/README new file mode 100644 index 0000000..afa9853 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/README @@ -0,0 +1,117 @@ +============== +gpx2navit_txt README +============== +bodenseepingu +4/01/2008 + +What's This +=========== + gpx2navit_txt is a converter from GPX file to Navit Text map format + +For gpx2navit_txt was the original code from gpx2shp used and modified. +This is a output of Metro Manila Transit Map Project by JOCV (Japan +Overseas Cooperation Volunteers) program of JICA (Japan International +Cooperation Agency in 2004. It is provided you on GPL2. + + +How to Use +========== +- Basic + There are three types of data on GPX that are waypoint, trkpoint and +route. gpx2navit_txt converts the data to navit file(s) +Please try to convert a sample file "pinatest2.gpx" in this archive. + + prompt> gpx2navit_txt pinatest2.gpx + prompt> ls + pinatest2.gpx (source gpx) + pinatest2_meta.txt (meta data may be there) + + You can convert only a certain type of data like only waypoint or +track point using option '-w' (waypoint), '-t' (trackpoint) or '-r' +(route). + + prompt> gpx2navit_txt -r pinatest2.gpx + +- Convert path data to points and etc + As default, track point and route data is converted as a arc data but +you can convert it other ways using option '-p'(convert as point) and +'-e' (as edge). The edge file has '_edg' in the filename and the point +file has '_pnt' in the filename. + + prompt> gpx2navit_txt -p -e pinatest2.gpx + +- Statistics + If you add '-s' option you can see a conversion summery. + + prompt> gpx2navit_txt -s pinatest2.gpx + Track Points: + track count: 4 + point count: 658 + total length: 156565.627989 + unconverted: 0( 0.00%) + Routes: + route count: 1 + point count: 323 + total length: 9258.618971 + unconverted: 0( 0.00%) + Waypoints: + point count: 118 + +- Noise reduction + gpx2navit_txt has several thresholds to reduct the noise path data. The +value can set as '--min-points', '--min-length' and '--min-time'. Please +try a example below. + + prompt> gpx2navit_txt --min-points 6 -s pinatest2.gpx + gpx2navit_txt:../pinatest3.gpx:3962 track was not converted because of + less then 6 points. (<- this path is not converted because the path + has only 5 points) + Track Points: + track count: 3 + point count: 653 + total length: 156439.490642 + unconverted: 1(25.00%) + Routes: + route count: 1 + point count: 323 + total length: 9258.618971 + unconverted: 0( 0.00%) + Waypoints: + point count: 118 + + +- Length and time units + You can choose any length related units that are supported by proj4 +for attribute table using + '--length-unit' (for length column, default: m), + '--time-unit' (for time column, default: sec), + '--speed-length-unit' (for speed column, default: km), + '--speed-time-unit' (for speed column, default: hour) and + '--length-ellipsoid' (for length calculation, default: UGS84). + You can see the supported units by 'geod -lu' and 'geod -le' command. + Supported time unit are 'sec', 'min', 'hour' and 'day'. + +- Other futures + There are other futures in gpx2navit_txt. Please check the option list using + + gpx2navit_txt --help + +Problem or Suggestion +===================== +Please let me know about your opinion in English by e-mail. + bodenseepingu at users.sourceforge.net + navit on sourceforge.net + http://gpx2shp.sourceforge.jp/ for original gpx2shp + todo for gpx2navit_txt + +Acknowledgments +=============== +NEDA (National Economic and Development Authority) Region IV-B office + My generous counter part +Yoshio Tanaka + My project leader gpx2shp +Petter Reinholdtsen + Many support to develop this +Frank Warmerdam and the team + shapelib and proj4 +bodenseepingu for modifications towards navit diff --git a/navit/src/tools/gpx2navit_txt/TODO b/navit/src/tools/gpx2navit_txt/TODO new file mode 100644 index 0000000..de50135 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/TODO @@ -0,0 +1 @@ +....to be filled diff --git a/navit/src/tools/gpx2navit_txt/config.guess b/navit/src/tools/gpx2navit_txt/config.guess new file mode 100644 index 0000000..8229471 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/config.guess @@ -0,0 +1,1453 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +timestamp='2004-11-12' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + cats:OpenBSD:*:*) + echo arm-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + luna88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit 0 ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit 0 ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit 0 ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms && exit 0 ;; + I*) echo ia64-dec-vms && exit 0 ;; + V*) echo vax-dec-vms && exit 0 ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/navit/src/tools/gpx2navit_txt/config.sub b/navit/src/tools/gpx2navit_txt/config.sub new file mode 100644 index 0000000..0f84ac2 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/config.sub @@ -0,0 +1,1566 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +timestamp='2004-11-30' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | msp430-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/navit/src/tools/gpx2navit_txt/configure.ac b/navit/src/tools/gpx2navit_txt/configure.ac new file mode 100644 index 0000000..df89dd6 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/configure.ac @@ -0,0 +1,46 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.57) +AC_INIT(gpx2shp, 0.69, kogame at gmail.com) +AM_INIT_AUTOMAKE(gpx2shp, 0.69) +AC_CONFIG_SRCDIR(src/main.c) +AM_CONFIG_HEADER(src/config.h) + +# Checks for programs. +AC_PROG_CC +AC_PROG_MAKE_SET + +# Ask GCC to give us heaps of warnings +if eval "test x$GCC = xyes"; then + CFLAGS="$CFLAGS -W -Wall -Wcast-align -Wcast-qual" + CFLAGS="$CFLAGS -Wmissing-declarations -Wmissing-prototypes" + CFLAGS="$CFLAGS -Wstrict-prototypes -Wpointer-arith -Wreturn-type" + AC_SUBST(CFLAGS) +fi + +AC_ARG_ENABLE(coverage, +[ --enable-coverage compile with coverage testing enabled], + CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage") + +# Checks for libraries. +AC_CHECK_LIB(proj, pj_param) +AC_CHECK_LIB(expat, XML_SetUserData) +AC_CHECK_LIB(m, cos) + +# Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(limits.h stdlib.h string.h unistd.h) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_STRUCT_TM + +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_MKTIME +AC_FUNC_REALLOC +AC_CHECK_FUNCS(memset sqrt) + +AC_CONFIG_FILES(Makefile src/Makefile man/Makefile) +AC_OUTPUT diff --git a/navit/src/tools/gpx2navit_txt/depcomp b/navit/src/tools/gpx2navit_txt/depcomp new file mode 100755 index 0000000..807b991 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/depcomp @@ -0,0 +1,423 @@ +#! /bin/sh + +# depcomp - compile a program generating dependencies as side-effects +# Copyright 1999, 2000 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi +# `libtool' can also be set to `yes' or `no'. + +if test -z "$depfile"; then + base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` + dir=`echo "$object" | sed 's,/.*$,/,'` + if test "$dir" = "$object"; then + dir= + fi + # FIXME: should be _deps on DOS. + depfile="$dir.deps/$base" +fi + +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. This file always lives in the current directory. + # Also, the AIX compiler puts `$object:' at the start of each line; + # $object doesn't have directory information. + stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + outname="$stripped.o" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + tmpdepfile1="$dir.libs/$base.lo.d" + tmpdepfile2="$dir.libs/$base.d" + "$@" -Wc,-MD + else + tmpdepfile1="$dir$base.o.d" + tmpdepfile2="$dir$base.d" + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + else + tmpdepfile="$tmpdepfile2" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a space and a tab in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. We will use -o /dev/null later, + # however we can't do the remplacement now because + # `-o $object' might simply not be used + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + -*) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 diff --git a/navit/src/tools/gpx2navit_txt/develop/structures.gif b/navit/src/tools/gpx2navit_txt/develop/structures.gif new file mode 100644 index 0000000000000000000000000000000000000000..ba0c18aba4ae1d36ce75a005b1a9622724e1cdc5 GIT binary patch literal 39033 zcmV(^K-IrTNk%w1VRr;{1cU$p|Ns900092~|DT_qA0Hn-KR>^}z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dR;nu_}fr} z#MN!xuUpttOxq0xCNaTX;r!jOYtEtV-RXU}>-|jbZM>KbC-QyWoNeFlUCsFowVyo- zcp%5b&EJMw)H%c6I6dHSyV?eB#tHtkvF){2T)}n7a68q=0kzEz-rp1#+*Pu-`-pK~ z)G+v%cp0wYMvi-Bd*w$WXJMF>Qzm}mJ)7c6wc_0B5(IhRQWxV|du2wvk2RNY!pfVG zz2ik&*wZ^, 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing 0.4 - GNU automake" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. + You can get \`$1Help2man' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 diff --git a/navit/src/tools/gpx2navit_txt/mkinstalldirs b/navit/src/tools/gpx2navit_txt/mkinstalldirs new file mode 100755 index 0000000..8ab885e --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/mkinstalldirs @@ -0,0 +1,99 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + +# process command line arguments +while test $# -gt 0 ; do + case "${1}" in + -h | --help | --h* ) # -h for help + echo "${usage}" 1>&2; exit 0 ;; + -m ) # -m PERM arg + shift + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } + dirmode="${1}" + shift ;; + -- ) shift; break ;; # stop option processing + -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option + * ) break ;; # first non-opt arg + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in +0) exit 0 ;; +esac + +case $dirmode in +'') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi ;; +*) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi ;; +esac + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 3 +# End: +# mkinstalldirs ends here diff --git a/navit/src/tools/gpx2navit_txt/pinatest2.gpx b/navit/src/tools/gpx2navit_txt/pinatest2.gpx new file mode 100644 index 0000000..3d99f40 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/pinatest2.gpx @@ -0,0 +1,4790 @@ + + + +Manila to Mt. Pinatubo +Toshihiro Hiraoka +Toshihiro Hiraoka +Manila Mt. Pinatubo gpx2shp +http://gpx2shp.sourceforge.jp +This is test data for gpx2shp. + + + +07-SEP-04 +1 + + +42.916016 + + + +48.203369 + + + +49.645264 + + + +51.567871 + + + +48.683960 + + + +51.087158 + + + +46.280640 + + + +52.529175 + + + +39.551270 + + + +47.241821 + + + +46.280640 + + + +48.683960 + + + +69.352295 + + + +54.451782 + + + +53.009766 + + + +52.529175 + + + +52.048584 + + + +50.125977 + + + +48.203369 + + + +49.645264 + + + +48.683960 + + + +50.606567 + + + +48.683960 + + + +52.529175 + + + +53.490479 + + + +48.203369 + + + +49.645264 + + + +50.125977 + + + +47.241821 + + + +44.838623 + + + +47.241821 + + + +34.264160 + + + +25.131714 + + + +25.131714 + + + +25.612305 + + + +39.551270 + + + +34.264160 + + + +34.264160 + + + +28.015503 + + + +28.496216 + + + +26.092896 + + + +25.612305 + + + +26.573608 + + + +26.573608 + + + +24.170288 + + + +15.037720 + + + +15.518433 + + + +15.999023 + + + +9.269897 + + + +17.441162 + + + +13.595825 + + + +13.115112 + + + +13.595825 + + + +15.518433 + + + +13.115112 + + + +5.905273 + + + +6.385864 + + + +8.308594 + + + +5.424561 + + + +4.943848 + + + +11.192505 + + + +12.634399 + + + +11.673218 + + + +15.999023 + + + +12.153809 + + + +21.286377 + + + +17.441162 + + + +15.518433 + + + +14.557007 + + + +12.634399 + + + +13.115112 + + + +11.192505 + + + +22.247559 + + + +20.324951 + + + +27.534912 + + + +11.673218 + + + +10.711792 + + + +17.921753 + + + +15.037720 + + + +18.883057 + + + +10.231201 + + + +24.170288 + + + +12.153809 + + + +14.557007 + + + +14.076416 + + + +11.192505 + + + +22.728271 + + + +10.711792 + + + +22.247559 + + + +10.711792 + + + +22.247559 + + + +10.231201 + + + +8.308594 + + + +8.308594 + + + +9.750610 + + + +9.269897 + + + +13.595825 + + + +7.827881 + + + +7.827881 + + + +7.347168 + + + +14.076416 + + + +7.827881 + + + +10.711792 + + + +15.037720 + + + +16.479736 + + + +17.441162 + + + +9.269897 + + + +8.308594 + + + +9.269897 + + + +9.269897 + + + +10.231201 + + + +9.269897 + + + +12.153809 + + + +13.115112 + + + +16.479736 + + + +8.308594 + + + +13.115112 + + + +15.037720 + + + +9.750610 + + + +14.557007 + + + +10.231201 + + + +17.921753 + + + +8.789185 + + + +12.153809 + + + +18.402344 + + + +21.286377 + + + +20.324951 + + + +19.844360 + + + +25.131714 + + + +19.844360 + + + +22.728271 + + + +23.689575 + + + +15.999023 + + + +9.269897 + + + +13.115112 + + + +9.269897 + + + +13.115112 + + + +10.711792 + + + +14.076416 + + + +8.789185 + + + +12.153809 + + + +18.883057 + + + +16.960449 + + + +16.960449 + + + +15.037720 + + + +16.479736 + + + +13.595825 + + + +16.960449 + + + +17.441162 + + + +13.595825 + + + +10.711792 + + + +19.363770 + + + +15.037720 + + + +15.518433 + + + +13.595825 + + + +17.921753 + + + +10.231201 + + + +13.595825 + + + +15.999023 + + + +12.634399 + + + +13.115112 + + + +20.805664 + + + +17.921753 + + + +14.076416 + + + +31.380127 + + + +29.457520 + + + +30.899536 + + + +31.380127 + + + +25.131714 + + + +34.264160 + + + +27.054321 + + + +20.324951 + + + +16.960449 + + + +18.402344 + + + +15.518433 + + + +14.557007 + + + +15.999023 + + + +22.728271 + + + +22.247559 + + + +25.131714 + + + +15.999023 + + + +23.689575 + + + +17.921753 + + + +17.921753 + + + +26.092896 + + + +21.286377 + + + +19.363770 + + + +28.015503 + + + +31.380127 + + + +24.170288 + + + +35.706055 + + + +30.899536 + + + +18.402344 + + + +25.612305 + + + +13.595825 + + + +16.960449 + + + +15.999023 + + + +15.037720 + + + +20.324951 + + + +16.960449 + + + +14.557007 + + + +14.076416 + + + +15.037720 + + + +15.037720 + + + +14.076416 + + + +13.595825 + + + +16.479736 + + + +15.999023 + + + +16.479736 + + + +18.883057 + + + +19.844360 + + + +21.766968 + + + +20.324951 + + + +17.921753 + + + +15.999023 + + + +18.402344 + + + +19.844360 + + + +14.076416 + + + +17.921753 + + + +19.363770 + + + +20.805664 + + + +14.076416 + + + +20.324951 + + + +13.595825 + + + +17.921753 + + + +21.286377 + + + +14.076416 + + + +21.286377 + + + +17.921753 + + + +19.363770 + + + +14.557007 + + + +17.921753 + + + +20.324951 + + + +14.557007 + + + +20.805664 + + + +22.728271 + + + +15.037720 + + + +24.651001 + + + +15.518433 + + + +32.822266 + + + +17.921753 + + + +17.441162 + + + +24.651001 + + + +16.479736 + + + +17.441162 + + + +23.208984 + + + +24.170288 + + + +17.921753 + + + +26.092896 + + + +19.363770 + + + +27.534912 + + + +28.976929 + + + +31.860718 + + + +29.457520 + + + +33.783447 + + + +29.457520 + + + +29.457520 + + + +31.860718 + + + +37.148071 + + + +41.473999 + + + +35.225464 + + + +31.380127 + + + +27.054321 + + + +34.744873 + + + +36.186768 + + + +46.761230 + + + +49.645264 + + + +46.761230 + + + +42.435425 + + + +41.473999 + + + +40.032104 + + + +36.186768 + + + +51.087158 + + + +44.358032 + + + +54.932373 + + + +76.081421 + + + +75.600830 + + + +75.120239 + + + +71.755493 + + + +75.600830 + + + +87.136597 + + + +90.981934 + + + +95.307739 + + + +102.517700 + + + +107.324341 + + + +111.169556 + + + +137.605835 + + + +143.373657 + + + +152.025757 + + + +153.467651 + + + +150.103027 + + + +142.893066 + + + +136.163940 + + + +132.799316 + + + +129.915283 + + + +127.031372 + + + +126.069946 + + + +115.495605 + + + +103.479004 + + + +90.501343 + + + +78.484741 + + + +75.600830 + + + +69.832886 + + + +74.639526 + + + +81.849365 + + + +84.733398 + + + +84.733398 + + + +91.462524 + + + +100.114502 + + + +103.959717 + + + +113.572998 + + + +121.263550 + + + +122.224731 + + + +131.837891 + + + +139.528442 + + + +141.451050 + + + +141.451050 + + + +134.721924 + + + +123.186157 + + + +119.340820 + + + +110.688843 + + + +105.882446 + + + +98.191895 + + + +90.981934 + + + +87.136597 + + + +85.694580 + + + +79.446045 + + + +76.081421 + + + +67.910278 + + + +61.181030 + + + +56.855103 + + + +54.932373 + + + +46.280640 + + + +45.799927 + + + +38.109375 + + + +31.860718 + + + +26.092896 + + + +28.976929 + + + +27.054321 + + + +30.418823 + + + +27.054321 + + + +23.689575 + + + +23.689575 + + + +23.689575 + + + +18.883057 + + + +19.844360 + + + +18.883057 + + + +17.441162 + + + +29.938110 + + + +36.186768 + + + +42.916016 + + + +50.606567 + + + +54.451782 + + + +60.700317 + + + +63.103638 + + + +77.042847 + + + +65.026367 + + + +68.871582 + + + +68.871582 + + + +75.600830 + + + +79.926636 + + + +82.810791 + + + +84.252686 + + + +85.213989 + + + +85.213989 + + + +87.136597 + + + +91.943237 + + + +95.788452 + + + +94.827148 + + + +95.307739 + + + +94.827148 + + + +92.904541 + + + +90.981934 + + + +86.656006 + + + +93.385132 + + + +90.501343 + + + +90.501343 + + + +93.865845 + + + +92.423950 + + + +94.827148 + + + +98.191895 + + + +100.114502 + + + +98.672485 + + + +105.882446 + + + +108.766235 + + + +110.208252 + + + +117.418213 + + + +119.821411 + + + +124.628052 + + + +122.224731 + + + +129.434692 + + + +129.915283 + + + +154.909546 + + + +144.815796 + + + +152.506348 + + + +156.351563 + + + +157.793579 + + + +185.191162 + + + +204.417480 + + + +209.224121 + + + + + + 08-SEP-04 +2 + + +206.340088 + + + +209.704834 + + + +210.666016 + + + +210.185425 + + + +207.301392 + + + +207.301392 + + + +205.378784 + + + +202.014282 + + + +195.765625 + + + +191.439575 + + + +190.478394 + + + +188.075073 + + + +188.555786 + + + +187.113770 + + + +185.191162 + + + +185.671753 + + + +184.710571 + + + +184.710571 + + + +184.710571 + + + +183.749023 + + + +182.307129 + + + +182.307129 + + + +180.865234 + + + +179.903809 + + + +179.423218 + + + +178.461914 + + + +178.942627 + + + +178.942627 + + + +177.981201 + + + +177.981201 + + + +176.539307 + + + +177.981201 + + + +177.020020 + + + +176.058594 + + + +174.135864 + + + +174.616577 + + + +174.135864 + + + +173.655273 + + + +173.174683 + + + +173.174683 + + + +173.174683 + + + +171.732666 + + + +169.810059 + + + +169.810059 + + + +169.810059 + + + +170.771362 + + + +170.290649 + + + +169.329468 + + + +168.848755 + + + +168.368042 + + + +167.406738 + + + +167.406738 + + + +165.964722 + + + +165.003418 + + + +164.042114 + + + +164.522705 + + + +159.716187 + + + +161.158203 + + + +157.793579 + + + +157.793579 + + + +155.870972 + + + +155.870972 + + + +152.025757 + + + +152.506348 + + + +152.025757 + + + +151.064209 + + + +147.699707 + + + +146.257813 + + + +138.086548 + + + +135.202515 + + + +134.721924 + + + +133.760498 + + + +133.279907 + + + +131.357300 + + + +130.395996 + + + +131.357300 + + + +130.876709 + + + +131.357300 + + + +131.837891 + + + +131.837891 + + + +131.357300 + + + +133.760498 + + + +134.241211 + + + +135.683105 + + + +136.644653 + + + +135.202515 + + + +137.125244 + + + +136.644653 + + + +135.683105 + + + +134.241211 + + + +127.031372 + + + +124.147339 + + + +116.937500 + + + +114.053589 + + + + + + 08-SEP-04 02 +3 + + +206.340088 + + + +209.704834 + + + +210.666016 + + + +210.185425 + + + +207.301392 + + + +207.301392 + + + +205.378784 + + + +202.014282 + + + +195.765625 + + + +191.439575 + + + +190.478394 + + + +188.075073 + + + +188.555786 + + + +187.113770 + + + +185.191162 + + + +185.671753 + + + +184.710571 + + + +184.710571 + + + +184.710571 + + + +183.749023 + + + +182.307129 + + + +182.307129 + + + +180.865234 + + + +179.903809 + + + +179.423218 + + + +178.461914 + + + +178.942627 + + + +178.942627 + + + +177.981201 + + + +177.981201 + + + +176.539307 + + + +177.981201 + + + +177.020020 + + + +176.058594 + + + +174.135864 + + + +174.616577 + + + +174.135864 + + + +173.655273 + + + +173.174683 + + + +173.174683 + + + +173.174683 + + + +171.732666 + + + +169.810059 + + + +169.810059 + + + +169.810059 + + + +170.771362 + + + +170.290649 + + + +169.329468 + + + +168.848755 + + + +168.368042 + + + +167.406738 + + + +167.406738 + + + +165.964722 + + + +165.003418 + + + +164.042114 + + + +164.522705 + + + +159.716187 + + + +161.158203 + + + +157.793579 + + + +157.793579 + + + +155.870972 + + + +155.870972 + + + +152.025757 + + + +152.506348 + + + +152.025757 + + + +151.064209 + + + +147.699707 + + + +146.257813 + + + +138.086548 + + + +135.202515 + + + +134.721924 + + + +133.760498 + + + +133.279907 + + + +131.357300 + + + +130.395996 + + + +131.357300 + + + +130.876709 + + + +131.357300 + + + +131.837891 + + + +131.837891 + + + +131.357300 + + + +133.760498 + + + +134.241211 + + + +135.683105 + + + +136.644653 + + + +135.202515 + + + +137.125244 + + + +136.644653 + + + +135.683105 + + + +134.241211 + + + +127.031372 + + + +124.147339 + + + +120.302124 + + + +116.937500 + + + +114.053589 + + + +116.937500 + + + +108.766235 + + + +106.843628 + + + +119.821411 + + + +116.937500 + + + +119.821411 + + + +121.263550 + + + +128.473389 + + + +132.318604 + + + +133.279907 + + + +135.683105 + + + +137.125244 + + + +138.567261 + + + +140.970459 + + + +143.854370 + + + +147.699707 + + + +149.622314 + + + +151.064209 + + + +151.544922 + + + +152.986938 + + + +152.986938 + + + +153.467651 + + + +153.948364 + + + +155.390259 + + + +155.390259 + + + +158.274170 + + + +159.235474 + + + +159.716187 + + + +159.716187 + + + +160.196899 + + + +161.638916 + + + +162.600098 + + + +161.638916 + + + +161.638916 + + + +162.600098 + + + +167.887329 + + + +171.252075 + + + +170.290649 + + + +173.174683 + + + +174.616577 + + + +174.616577 + + + +176.539307 + + + +180.384521 + + + +179.903809 + + + +182.307129 + + + +184.229858 + + + +183.749023 + + + +189.997681 + + + +197.207520 + + + +202.975464 + + + +203.936890 + + + +203.936890 + + + +203.936890 + + + +204.898071 + + + +206.340088 + + + +206.340088 + + + +202.014282 + + + +205.859497 + + + +206.340088 + + + +205.859497 + + + +206.820679 + + + +210.185425 + + + +210.185425 + + + +209.704834 + + + + + + 10-SEP-04 +4 + +209.704834 + + + +206.340088 + + + +206.340088 + + + +207.782104 + + + +206.820679 + + + +205.859497 + + + +206.340088 + + + +203.456177 + + + +202.975464 + + + +201.533569 + + + +201.533569 + + + +199.610840 + + + +195.765625 + + + +194.323730 + + + +193.843018 + + + +190.478394 + + + +186.152466 + + + +185.671753 + + + +183.749023 + + + +182.787842 + + + +181.345825 + + + +179.423218 + + + +178.461914 + + + +177.981201 + + + +176.539307 + + + +175.577881 + + + +175.577881 + + + +175.577881 + + + +175.577881 + + + +174.616577 + + + +174.135864 + + + +174.135864 + + + +173.655273 + + + +173.174683 + + + +173.655273 + + + +172.213257 + + + +171.732666 + + + +171.252075 + + + +172.693970 + + + +172.213257 + + + +171.252075 + + + +170.771362 + + + +169.810059 + + + +170.290649 + + + +169.810059 + + + +169.329468 + + + +168.368042 + + + +168.368042 + + + +164.522705 + + + +162.119507 + + + +160.677490 + + + +160.677490 + + + +158.274170 + + + +157.793579 + + + +152.506348 + + + +152.025757 + + + +148.661011 + + + +147.218994 + + + +138.567261 + + + +136.644653 + + + +133.279907 + + + +137.605835 + + + +134.241211 + + + +136.644653 + + + +135.683105 + + + +132.799316 + + + +129.915283 + + + +130.395996 + + + +131.357300 + + + +129.434692 + + + +129.434692 + + + +147.699707 + + + +144.335205 + + + +139.047852 + + + +139.528442 + + + +140.009155 + + + +139.528442 + + + +140.970459 + + + +139.528442 + + + +141.451050 + + + +135.202515 + + + +133.279907 + + + +132.318604 + + + +135.202515 + + + +136.644653 + + + +139.528442 + + + +142.893066 + + + +141.931763 + + + +140.970459 + + + +140.489868 + + + +141.451050 + + + +141.451050 + + + +141.931763 + + + +141.931763 + + + +136.163940 + + + +133.279907 + + + +130.876709 + + + +131.357300 + + + +130.876709 + + + +130.395996 + + + +130.876709 + + + +130.876709 + + + +134.241211 + + + +134.241211 + + + +123.666748 + + + +120.782837 + + + +117.418213 + + + +115.014893 + + + +112.611572 + + + +113.092285 + + + +112.611572 + + + +113.572998 + + + +115.014893 + + + +115.014893 + + + +113.572998 + + + +112.611572 + + + +111.650269 + + + +111.650269 + + + +112.130981 + + + +110.688843 + + + +109.246948 + + + +107.324341 + + + +104.921021 + + + +102.517700 + + + +102.037109 + + + +102.517700 + + + +100.595093 + + + +101.556396 + + + +100.114502 + + + +99.153076 + + + +99.633789 + + + +98.672485 + + + +98.191895 + + + +97.711182 + + + +97.230469 + + + +97.711182 + + + +97.230469 + + + +96.749878 + + + +96.749878 + + + +96.269287 + + + +96.269287 + + + +96.749878 + + + +95.307739 + + + +93.865845 + + + +94.827148 + + + +94.346558 + + + +93.865845 + + + +94.346558 + + + +93.385132 + + + +93.865845 + + + +94.346558 + + + +93.865845 + + + +93.385132 + + + +92.904541 + + + +92.904541 + + + +92.904541 + + + +91.943237 + + + +90.501343 + + + +90.020630 + + + +89.059326 + + + +90.020630 + + + +88.578735 + + + +90.020630 + + + +88.578735 + + + +88.578735 + + + +86.656006 + + + +87.136597 + + + +87.617188 + + + +88.098022 + + + +87.136597 + + + +87.136597 + + + +86.175293 + + + +89.059326 + + + +86.175293 + + + +86.175293 + + + +85.213989 + + + +84.733398 + + + +83.771973 + + + +83.771973 + + + +84.733398 + + + +84.252686 + + + +84.733398 + + + +84.733398 + + + +85.694580 + + + +83.771973 + + + +84.252686 + + + +82.810791 + + + +84.733398 + + + +85.694580 + + + +86.175293 + + + +86.175293 + + + +86.656006 + + + +86.175293 + + + +87.617188 + + + +89.539917 + + + +90.020630 + + + +90.501343 + + + +90.981934 + + + +90.501343 + + + +90.981934 + + + +91.462524 + + + +90.501343 + + + +90.501343 + + + +90.501343 + + + +90.501343 + + + +90.501343 + + + +90.020630 + + + +90.501343 + + + +89.059326 + + + +90.020630 + + + +89.059326 + + + +89.059326 + + + +90.501343 + + + +90.501343 + + + +89.539917 + + + +89.059326 + + + +89.059326 + + + +88.578735 + + + +88.578735 + + + +87.136597 + + + +86.175293 + + + +86.175293 + + + +82.330078 + + + +86.656006 + + + +87.136597 + + + +86.656006 + + + +86.656006 + + + +86.175293 + + + +86.175293 + + + +84.733398 + + + +84.733398 + + + +84.252686 + + + +84.733398 + + + +84.252686 + + + +84.252686 + + + +83.291382 + + + +83.291382 + + + +81.849365 + + + +82.330078 + + + +81.849365 + + + +84.252686 + + + +83.291382 + + + +82.810791 + + + +83.291382 + + + +84.733398 + + + +84.252686 + + + +83.771973 + + + +83.291382 + + + +83.291382 + + + +84.252686 + + + +83.771973 + + + +81.368774 + + + +80.888184 + + + +80.407471 + + + +80.888184 + + + +81.849365 + + + +79.926636 + + + +80.407471 + + + +78.484741 + + + +78.484741 + + + +78.004028 + + + +78.484741 + + + +78.484741 + + + +78.004028 + + + +78.004028 + + + +78.484741 + + + +77.523438 + + + +77.523438 + + + +78.004028 + + + +77.523438 + + + +77.523438 + + + +77.042847 + + + +76.562134 + + + +77.042847 + + + +77.042847 + + + +77.042847 + + + +76.562134 + + + +77.042847 + + + +77.523438 + + + +78.484741 + + + +78.004028 + + + +77.042847 + + + +76.562134 + + + +76.562134 + + + +76.562134 + + + +76.562134 + + + +76.562134 + + + +77.042847 + + + +76.081421 + + + +76.081421 + + + +76.562134 + + + +75.600830 + + + +76.562134 + + + +76.562134 + + + +75.600830 + + + +76.081421 + + + +76.562134 + + + +76.081421 + + + +75.600830 + + + +75.600830 + + + +74.639526 + + + +75.120239 + + + +74.639526 + + + +74.639526 + + + +74.639526 + + + +75.120239 + + + +75.120239 + + + +75.120239 + + + +75.120239 + + + +75.120239 + + + +75.120239 + + + +74.639526 + + + +75.120239 + + + +75.120239 + + + +80.888184 + + + +78.965454 + + + +77.042847 + + + +74.158813 + + + +71.755493 + + + +71.274902 + + + +69.832886 + + + +69.832886 + + + +68.871582 + + + + + Only 5 points +7 + + +28.976929 + + + +28.976929 + + + +28.496216 + + + +28.496216 + + + +28.015503 + + + + + + 45.307495 + 001 + 001 + 001 + Flag + + + 50.594727 + 002 + 002 + 002 + Flag + + + 46.989868 + 003 + 003 + 003 + Flag + + + 38.097656 + 004 + 004 + 004 + Flag + + + 147.687134 + 005 + 005 + 005 + Flag + + + 145.043579 + 006 + 006 + 006 + Flag + + + 160.905151 + 007 + 007 + 007 + Flag + + + 165.231079 + 008 + 008 + 008 + Flag + + + 173.882935 + 009 + 009 + 009 + Flag + + + 166.192383 + 010 + 010 + 010 + Flag + + + 175.324829 + 011 + 011 + 011 + Flag + + + 186.860474 + 012 + 012 + 012 + Flag + + + 208.730347 + 013 + 013 + 013 + Flag + + + 211.374023 + 014 + 014 + 014 + Flag + + + 213.296631 + 015 + 015 + 015 + Flag + + + 189.984863 + 016 + 016 + 016 + Flag + + + 187.100830 + 017 + 017 + 017 + Flag + + + 185.418579 + 018 + 018 + 018 + Flag + + + 181.092651 + 019 + 019 + 019 + Flag + + + 179.410400 + 020 + 020 + 020 + Flag + + + 178.689453 + 021 + 021 + 021 + Flag + + + 176.526489 + 022 + 022 + 022 + Flag + + + 177.247437 + 023 + 023 + 023 + Flag + + + 173.161987 + 024 + 024 + 024 + Flag + + + 170.277832 + 025 + 025 + 025 + Flag + + + 170.037598 + 026 + 026 + 026 + Flag + + + 169.797241 + 027 + 027 + 027 + Flag + + + 169.316650 + 028 + 028 + 028 + Flag + + + 169.076294 + 029 + 029 + 029 + Flag + + + 164.510010 + 030 + 030 + 030 + Flag + + + 164.750366 + 031 + 031 + 031 + Flag + + + 166.432617 + 032 + 032 + 032 + Flag + + + 165.711670 + 033 + 033 + 033 + Flag + + + 162.106812 + 034 + 034 + 034 + Flag + + + 157.300293 + 035 + 035 + 035 + Flag + + + 154.175903 + 036 + 036 + 036 + Flag + + + 152.253296 + 037 + 037 + 037 + Flag + + + 152.734009 + 038 + 038 + 038 + Flag + + + 148.167847 + 039 + 039 + 039 + Flag + + + 142.880615 + 040 + 040 + 040 + Flag + + + 131.344849 + 041 + 041 + 041 + Flag + + + 131.585205 + 042 + 042 + 042 + Flag + + + 126.057617 + 043 + 043 + 043 + Flag + + + 126.297974 + 044 + 044 + 044 + Flag + + + 127.499634 + 045 + 045 + 045 + Flag + + + 128.701294 + 046 + 046 + 046 + Flag + + + 131.585205 + 047 + 047 + 047 + Flag + + + 130.623901 + 048 + 048 + 048 + Flag + + + 130.623901 + 049 + 049 + 049 + Flag + + + 130.143188 + 050 + 050 + 050 + Flag + + + 133.507812 + 051 + 051 + 051 + Flag + + + 142.640259 + 052 + 052 + 052 + Flag + + + 153.214600 + 053 + 053 + 053 + Flag + + + 160.184204 + 054 + 054 + 054 + Flag + + + 167.874634 + 055 + 055 + 055 + Flag + + + 174.363525 + 056 + 056 + 056 + Flag + + + 210.893311 + 057 + 057 + 057 + Flag + + + 214.017578 + 058 + 058 + 058 + Flag + + + 210.652954 + 059 + 059 + 059 + Flag + + + 216.180542 + 060 + 060 + 060 + Flag + + + 210.893311 + 061 + 061 + 061 + Flag + + + 169.797241 + 062 + 062 + 062 + Flag + + + 154.175903 + 063 + 063 + 063 + Flag + + + 137.593262 + 064 + 064 + 064 + Flag + + + 134.709473 + 065 + 065 + 065 + Flag + + + 126.297974 + 066 + 066 + 066 + Flag + + + 126.538330 + 067 + 067 + 067 + Flag + + + 144.803223 + 068 + 068 + 068 + Flag + + + 141.919312 + 069 + 069 + 069 + Flag + + + 139.515869 + 070 + 070 + 070 + Flag + + + 143.361206 + 071 + 071 + 071 + Flag + + + 134.469116 + 072 + 072 + 072 + Flag + + + 134.228760 + 073 + 073 + 073 + Flag + + + 135.430420 + 074 + 074 + 074 + Flag + + + 135.430420 + 075 + 075 + 075 + Flag + + + 96.978027 + 076 + 076 + 076 + Flag + + + 112.359009 + 077 + 077 + 077 + Flag + + + 114.281616 + 078 + 078 + 078 + Flag + + + 111.157349 + 079 + 079 + 079 + Flag + + + 110.436401 + 080 + 080 + 080 + Flag + + + 105.629761 + 081 + 081 + 081 + Flag + + + 103.226440 + 082 + 082 + 082 + Flag + + + 101.784546 + 083 + 083 + 083 + Flag + + + 102.986084 + 084 + 084 + 084 + Flag + + + 101.784546 + 085 + 085 + 085 + Flag + + + 93.853760 + 086 + 086 + 086 + Flag + + + 95.295654 + 087 + 087 + 087 + Flag + + + 95.055420 + 088 + 088 + 088 + Flag + + + 87.845459 + 089 + 089 + 089 + Flag + + + 92.892456 + 090 + 090 + 090 + Flag + + + 92.892456 + 091 + 091 + 091 + Flag + + + 90.489136 + 092 + 092 + 092 + Flag + + + 85.682495 + 093 + 093 + 093 + Flag + + + 86.884155 + 094 + 094 + 094 + Flag + + + 88.566528 + 095 + 095 + 095 + Flag + + + 87.605103 + 096 + 096 + 096 + Flag + + + 89.287476 + 097 + 097 + 097 + Flag + + + 92.652100 + 098 + 098 + 098 + Flag + + + 91.450317 + 099 + 099 + 099 + Flag + + + 91.450317 + 100 + 100 + 100 + Flag + + + 91.690674 + 101 + 101 + 101 + Flag + + + 91.450317 + 102 + 102 + 102 + Flag + + + 91.690674 + 103 + 103 + 103 + Flag + + + 88.566528 + 104 + 104 + 104 + Flag + + + 87.364868 + 105 + 105 + 105 + Flag + + + 85.682495 + 106 + 106 + 106 + Flag + + + 83.279297 + 107 + 107 + 107 + Flag + + + 79.674438 + 108 + 108 + 108 + Flag + + + 84.480957 + 109 + 109 + 109 + Flag + + + 84.721313 + 110 + 110 + 110 + Flag + + + 5.172729 + 111 + 111 + 111 + Flag + + + 28.965332 + 112 + 112 + 112 + Residence + + + 21.995728 + 113 + 113 + 113 + Flag + + + 325.049072 + GARMIN + GARMIN + GARMIN + Flag + + + 35.934692 + GRMEUR + GRMEUR + GRMEUR + Flag + + + 361.098145 + GRMPHX + GRMPHX + GRMPHX + Flag + + + 38.097656 + GRMTWN + GRMTWN + GRMTWN + Flag + + + 8.296997 + NEDA4 + NEDA4 + NEDA4 + Residence + + diff --git a/navit/src/tools/gpx2navit_txt/src/Makefile.am b/navit/src/tools/gpx2navit_txt/src/Makefile.am new file mode 100644 index 0000000..5cce6fa --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/Makefile.am @@ -0,0 +1,26 @@ +bin_PROGRAMS = gpx2navit_txt + +gpx2navit_txt_SOURCES = \ + emess.h \ + geod_for.c \ + geod_inv.c \ + geod_set.c \ + geodesic.h \ + gpx2navit_txt.h \ + main.c \ + misc.c \ + utils.c \ + parser.c \ + elementControl.c\ + setwpt.c \ + setpath.c \ + setmeta.c \ + errorcode.h + +INCLUDES= -I$(srcdir) + +AM_CFLAGS = -g + +debian-dist: + dpkg-buildpackage -rfakeroot -d -tc -us -uc + diff --git a/navit/src/tools/gpx2navit_txt/src/elementControl.c b/navit/src/tools/gpx2navit_txt/src/elementControl.c new file mode 100644 index 0000000..7fded1f --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/elementControl.c @@ -0,0 +1,225 @@ +#include "gpx2navit_txt.h" + +void startElementControl(parsedata * pdata, const char *element, + const char **attr); +void endElementControl(parsedata * pdata, const char *element); + +/* + * This method controls tag start event. + * It corrects attributes. + */ +void +startElementControl(parsedata * pdata, const char *element, + const char **attr) +{ + int i; + static int isFirstTrk = 1; + static int isFirstRte = 1; + static int isFirstPathpt = 1; + for (i = 0; attr[i]; i += 2) { + if (!strcmp(attr[i], "lon")) { + pdata->attr->lon = atof(attr[i + 1]); + } + if (!strcmp(attr[i], "lat")) { + pdata->attr->lat = atof(attr[i + 1]); + } + if (!strcmp(attr[i], "minlon")) { + pdata->attr->minlon = atof(attr[i + 1]); + } + if (!strcmp(attr[i], "minlat")) { + pdata->attr->minlat = atof(attr[i + 1]); + } + if (!strcmp(attr[i], "maxlon")) { + pdata->attr->maxlon = atof(attr[i + 1]); + } + if (!strcmp(attr[i], "maxlat")) { + pdata->attr->maxlat = atof(attr[i + 1]); + } + if (!strcmp(attr[i], "author")) { + strcpy(pdata->attr->author, attr[i + 1]); + } + } + if (pdata->prop->parseTrk) { + if (!strcmp(element, "trk")) { + if (isFirstTrk) { + isFirstTrk = 0; + } + } + if (!strcmp(element, "trkseg")) { + isFirstPathpt = 1; + } + if (!strcmp(element, "trkpt")) { + if (isFirstPathpt) { + initPathAttr(pdata->pattr, pdata->attr); + isFirstPathpt = 0; + } + } + } + if (pdata->prop->parseRte) { + if (!strcmp(element, "rte")) { + if (isFirstRte) { + isFirstRte = 0; + isFirstPathpt = 1; + } + } + if (!strcmp(element, "rtept")) { + if (isFirstPathpt) { + initPathAttr(pdata->pattr, pdata->attr); + isFirstPathpt = 0; + } + } + } +} + +/** + * This method is kicked by tag end event. + * It corrects char elements when the element tag has some data, + * then start to convert when tag is top level tag like . + */ +void endElementControl(parsedata * pdata, const char *element) +{ + static int isFirstWpt = 1; + static int isFirstTrkAsPoint = 1; + static int isFirstRteAsPoint = 1; + /* common elements */ + if (!strcmp(element, "name")) { + strcpy(pdata->attr->name, pdata->databuf); + } + if (!strcmp(element, "cmt")) { + strcpy(pdata->attr->cmt, pdata->databuf); + } + if (!strcmp(element, "desc")) { + strcpy(pdata->attr->desc, pdata->databuf); + } + if (!strcmp(element, "src")) { + strcpy(pdata->attr->src, pdata->databuf); + } + if (!strcmp(element, "link")) { + strcpy(pdata->attr->link, pdata->databuf); + } + if (!strcmp(element, "type")) { + strcpy(pdata->attr->type, pdata->databuf); + } + /* waypoint and metadata elements */ + if (!strcmp(element, "time")) { + strcpy(pdata->attr->time, pdata->databuf); + } + /* route and track point elements */ + if (!strcmp(element, "number")) { + pdata->attr->number = atoi(pdata->databuf); + } + /* waypoint elements */ + if (!strcmp(element, "ele")) { + pdata->attr->ele = atof(pdata->databuf); + } + if (!strcmp(element, "magvar")) { + pdata->attr->magvar = atof(pdata->databuf); + } + if (!strcmp(element, "geoidheight")) { + pdata->attr->geoidheight = atof(pdata->databuf); + } + if (!strcmp(element, "sym")) { + strcpy(pdata->attr->sym, pdata->databuf); + } + if (!strcmp(element, "fix")) { + strcpy(pdata->attr->fix, pdata->databuf); + } + if (!strcmp(element, "sat")) { + pdata->attr->sat = atoi(pdata->databuf); + } + if (!strcmp(element, "hdop")) { + pdata->attr->hdop = atof(pdata->databuf); + } + if (!strcmp(element, "vdop")) { + pdata->attr->vdop = atof(pdata->databuf); + } + if (!strcmp(element, "pdop")) { + pdata->attr->pdop = atof(pdata->databuf); + } + if (!strcmp(element, "ageofdgpsdata")) { + pdata->attr->ageofdgpsdata = atof(pdata->databuf); + } + /* metadata elements */ + if (!strcmp(element, "author")) { + strcpy(pdata->attr->author, pdata->databuf); + } + if (!strcmp(element, "keywords")) { + strcpy(pdata->attr->keywords, pdata->databuf); + } + if (!strcmp(element, "copyright")) { + strcpy(pdata->attr->copyright, pdata->databuf); + } + if (!strcmp(element, "year")) { + pdata->attr->year = atoi(pdata->databuf); + } + if (!strcmp(element, "license")) { + strcpy(pdata->attr->license, pdata->databuf); + } + if (!strcmp(element, "bounds")) { + /* none */ + } + /* top elements */ + /* set waypoint data */ + if (!strcmp(element, "wpt")) { + if (pdata->prop->parseWpt) { + if (isFirstWpt) { + isFirstWpt = 0; + } + //todo + if (DEBUG) { + fprintf(stderr,"\neectrl wpt %s %s", + pdata->attr->desc,pdata->attr->name); + } + setWpt(pdata); + wipeAttr(pdata->attr); + } + } + /* set trackpoint data */ + if (!strcmp(element, "trkpt")) { + if (pdata->prop->parseTrk) { + setPathData(pdata->pattr, pdata->attr); + if (!pdata->prop->isFast) + setPathInterval(pdata); + } + /* set trackpoint data as point */ + if (pdata->prop->isPoint) { + if (isFirstTrkAsPoint) { + isFirstTrkAsPoint = 0; + } + setWpt(pdata); + } + wipeAttr(pdata->attr); + } + /* write trackpoint */ + if (!strcmp(element, "trkseg")) { + if (pdata->prop->parseTrk) { + setPath( pdata); + } + } + /* set route data */ + if (!strcmp(element, "rtept")) { + if (pdata->prop->parseRte) { + setPathData(pdata->pattr, pdata->attr); + if (!pdata->prop->isFast) + setPathInterval(pdata); + } + /* set route data as point */ + if (pdata->prop->isPoint) { + if (isFirstRteAsPoint) { + isFirstRteAsPoint = 0; + } + setWpt( pdata); + } + wipeAttr(pdata->attr); + } + /* write route */ + if (!strcmp(element, "rte")) { + if (pdata->prop->parseRte) { + setPath( pdata); + } + } + if (!strcmp(element, "metadata")) { + setMetadata(pdata); + wipeAttr(pdata->attr); + } +} diff --git a/navit/src/tools/gpx2navit_txt/src/emess.h b/navit/src/tools/gpx2navit_txt/src/emess.h new file mode 100644 index 0000000..b35bc25 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/emess.h @@ -0,0 +1,32 @@ +/* Error message processing header file */ +#ifndef EMESS_H +#define EMESS_H + +#ifndef lint +/*static char EMESS_H_ID[] = "@(#)emess.h 4.1 93/03/08 GIE REL";*/ +#endif + +struct EMESS { + char *File_name, /* input file name */ + *Prog_name; /* name of program */ + int File_line; /* approximate line read + where error occured */ +}; + +#ifdef EMESS_ROUTINE /* use type */ +/* for emess procedure */ +struct EMESS emess_dat = { (char *)0, (char *)0, 0 }; + +#ifdef sun /* Archaic SunOs 4.1.1, etc. */ +extern char *sys_errlist[]; +#define strerror(n) (sys_errlist[n]) +#endif + +#else /* for for calling procedures */ + +extern struct EMESS emess_dat; +void emess(int, char *, ...); + +#endif /* use type */ + +#endif /* end EMESS_H */ diff --git a/navit/src/tools/gpx2navit_txt/src/errorcode.h b/navit/src/tools/gpx2navit_txt/src/errorcode.h new file mode 100644 index 0000000..efaf88d --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/errorcode.h @@ -0,0 +1,22 @@ +#ifndef ERRORCODE_H +#define ERRORCODE_H + +/* os level */ +#define ERR_OUTOFMEMORY 11 +#define ERR_CANNOTOPEN 12 +#define ERR_CREATEFILE 13 +#define ERR_READERROR 14 +#define ERR_FREEFAILED 15 +/* option */ +#define ERR_NOARGS 21 +#define ERR_WRONGOPTION 22 +#define ERR_OPTIONCONFRICT 23 +/* parser */ +#define ERR_ISNOTGPX 31 +#define ERR_PARSEERROR 32 +/* unit */ +#define ERR_ELLPSUNIT 41 +#define ERR_LENGTHUNIT 42 +#define ERR_TIMEUNIT 43 + +#endif /* ERRORCODE_H */ diff --git a/navit/src/tools/gpx2navit_txt/src/geod_for.c b/navit/src/tools/gpx2navit_txt/src/geod_for.c new file mode 100644 index 0000000..4466a1d --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/geod_for.c @@ -0,0 +1,108 @@ +#ifndef lint +static const char SCCSID[] = + "@(#)geod_for.c 4.6 95/09/23 GIE REL"; +#endif +# include "projects.h" +# include "geodesic.h" +# define MERI_TOL 1e-9 +static double th1, costh1, sinth1, sina12, cosa12, M, N, c1, c2, D, P, s1; +static int merid, signS; +void geod_pre(void) +{ + al12 = adjlon(al12); /* reduce to +- 0-PI */ + signS = fabs(al12) > HALFPI ? 1 : 0; + th1 = ellipse ? atan(onef * tan(phi1)) : phi1; + costh1 = cos(th1); + sinth1 = sin(th1); + if ((merid = fabs(sina12 = sin(al12)) < MERI_TOL)) { + sina12 = 0.; + cosa12 = fabs(al12) < HALFPI ? 1. : -1.; + M = 0.; + } else { + cosa12 = cos(al12); + M = costh1 * sina12; + } + N = costh1 * cosa12; + if (ellipse) { + if (merid) { + c1 = 0.; + c2 = f4; + D = 1. - c2; + D *= D; + P = c2 / D; + } else { + c1 = geod_f * M; + c2 = f4 * (1. - M * M); + D = (1. - c2) * (1. - c2 - c1 * M); + P = (1. + .5 * c1 * M) * c2 / D; + } + } + if (merid) + s1 = HALFPI - th1; + else { + s1 = (fabs(M) >= 1.) ? 0. : acos(M); + s1 = sinth1 / sin(s1); + s1 = (fabs(s1) >= 1.) ? 0. : acos(s1); + } +} +void geod_for(void) +{ + double d, sind, u, V, X, ds, cosds, sinds, ss = 0, de; + + if (ellipse) { + d = geod_S / (D * geod_a); + if (signS) + d = -d; + u = 2. * (s1 - d); + V = cos(u + d); + X = c2 * c2 * (sind = sin(d)) * cos(d) * (2. * V * V - 1.); + ds = d + X - 2. * P * V * (1. - 2. * P * cos(u)) * sind; + ss = s1 + s1 - ds; + } else { + ds = geod_S / geod_a; + if (signS) + ds = -ds; + } + cosds = cos(ds); + sinds = sin(ds); + if (signS) + sinds = -sinds; + al21 = N * cosds - sinth1 * sinds; + if (merid) { + phi2 = atan(tan(HALFPI + s1 - ds) / onef); + if (al21 > 0.) { + al21 = PI; + if (signS) + de = PI; + else { + phi2 = -phi2; + de = 0.; + } + } else { + al21 = 0.; + if (signS) { + phi2 = -phi2; + de = 0; + } else + de = PI; + } + } else { + al21 = atan(M / al21); + if (al21 > 0) + al21 += PI; + if (al12 < 0.) + al21 -= PI; + al21 = adjlon(al21); + phi2 = atan(-(sinth1 * cosds + N * sinds) * sin(al21) / + (ellipse ? onef * M : M)); + de = atan2(sinds * sina12, + (costh1 * cosds - sinth1 * sinds * cosa12)); + if (ellipse) { + if (signS) + de += c1 * ((1. - c2) * ds + c2 * sinds * cos(ss)); + else + de -= c1 * ((1. - c2) * ds - c2 * sinds * cos(ss)); + } + } + lam2 = adjlon(lam1 + de); +} diff --git a/navit/src/tools/gpx2navit_txt/src/geod_inv.c b/navit/src/tools/gpx2navit_txt/src/geod_inv.c new file mode 100644 index 0000000..d938da8 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/geod_inv.c @@ -0,0 +1,73 @@ +#ifndef lint +static const char SCCSID[] = + "@(#)geod_inv.c 4.5 95/09/23 GIE REL"; +#endif +# include "projects.h" +# include "geodesic.h" +# define DTOL 1e-12 +void geod_inv(void) +{ + double th1, + th2, + thm, + dthm, + dlamm, + dlam, + sindlamm, + costhm, + sinthm, + cosdthm, + sindthm, L, E, cosd, d, X, Y, T, sind, tandlammp, u, v, D, A, B; + + if (ellipse) { + th1 = atan(onef * tan(phi1)); + th2 = atan(onef * tan(phi2)); + } else { + th1 = phi1; + th2 = phi2; + } + thm = .5 * (th1 + th2); + dthm = .5 * (th2 - th1); + dlamm = .5 * (dlam = adjlon(lam2 - lam1)); + if (fabs(dlam) < DTOL && fabs(dthm) < DTOL) { + al12 = al21 = geod_S = 0.; + return; + } + sindlamm = sin(dlamm); + costhm = cos(thm); + sinthm = sin(thm); + cosdthm = cos(dthm); + sindthm = sin(dthm); + L = sindthm * sindthm + (cosdthm * cosdthm - sinthm * sinthm) + * sindlamm * sindlamm; + d = acos(cosd = 1 - L - L); + if (ellipse) { + E = cosd + cosd; + sind = sin(d); + Y = sinthm * cosdthm; + Y *= (Y + Y) / (1. - L); + T = sindthm * costhm; + T *= (T + T) / L; + X = Y + T; + Y -= T; + T = d / sind; + D = 4. * T * T; + A = D * E; + B = D + D; + geod_S = geod_a * sind * (T - f4 * (T * X - Y) + + f64 * (X * (A + (T - .5 * (A - E)) * X) - + Y * (B + E * Y) + D * X * Y)); + tandlammp = tan(.5 * (dlam - .25 * (Y + Y - E * (4. - X)) * + (f2 * T + f64 * (32. * T - (20. * T - A) + * X - (B + + 4.) * Y)) * + tan(dlam))); + } else { + geod_S = geod_a * d; + tandlammp = tan(dlamm); + } + u = atan2(sindthm, (tandlammp * costhm)); + v = atan2(cosdthm, (tandlammp * sinthm)); + al12 = adjlon(TWOPI + v - u); + al21 = adjlon(TWOPI - v - u); +} diff --git a/navit/src/tools/gpx2navit_txt/src/geod_set.c b/navit/src/tools/gpx2navit_txt/src/geod_set.c new file mode 100644 index 0000000..1ba2ef4 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/geod_set.c @@ -0,0 +1,95 @@ +#ifndef lint +/* + * static const char SCCSID[]="@(#)geod_set.c 4.8 95/09/23 GIE REL"; + */ +#endif + +#define _IN_GEOD_SET + +#include +#include "projects.h" +#include "geodesic.h" +#include "emess.h" +void geod_set(int argc, char **argv) +{ + paralist *start = 0, *curr = NULL; /* added NULL */ + double es; + char *name; + int i; + +/* + * put arguments into internal linked list + */ + if (argc <= 0) + emess(1, "no arguments in initialization list"); + for (i = 0; i < argc; ++i) + if (i) + curr = curr->next = pj_mkparam(argv[i]); + else + start = curr = pj_mkparam(argv[i]); +/* + * set elliptical parameters + */ + if (pj_ell_set(start, &geod_a, &es)) + emess(1, "ellipse setup failure"); +/* + * set units + */ + if ((name = pj_param(start, "sunits").s)) { /* added parentheses */ + char *s; + + for (i = 0; (s = pj_units[i].id) && strcmp(name, s); ++i); + if (!s) + emess(1, "%s unknown unit conversion id", name); + fr_meter = 1. / (to_meter = atof(pj_units[i].to_meter)); + } else + to_meter = fr_meter = 1.; + if ((ellipse = es != 0.)) { /* added parentheses */ + onef = sqrt(1. - es); + geod_f = 1 - onef; + f2 = geod_f / 2; + f4 = geod_f / 4; + f64 = geod_f * geod_f / 64; + } else { + onef = 1.; + geod_f = f2 = f4 = f64 = 0.; + } +/* + * check if line or arc mode + */ + if (pj_param(start, "tlat_1").i) { + double del_S; +#undef f + phi1 = pj_param(start, "rlat_1").f; + lam1 = pj_param(start, "rlon_1").f; + if (pj_param(start, "tlat_2").i) { + phi2 = pj_param(start, "rlat_2").f; + lam2 = pj_param(start, "rlon_2").f; + geod_inv(); + geod_pre(); + } else if ((geod_S = pj_param(start, "dS").f)) { /* added + * parentheses + */ + al12 = pj_param(start, "rA").f; + geod_pre(); + geod_for(); + } else + emess(1, "incomplete geodesic/arc info"); + if ((n_alpha = pj_param(start, "in_A").i) > 0) { + if (!(del_alpha = pj_param(start, "rdel_A").f)) + emess(1, "del azimuth == 0"); + } else if ((del_S = fabs(pj_param(start, "ddel_S").f))) { /* added + * parentheses + */ + n_S = geod_S / del_S + .5; + } else if ((n_S = pj_param(start, "in_S").i) <= 0) + emess(1, "no interval divisor selected"); + } +/* + * free up linked list + */ + for (; start; start = curr) { + curr = start->next; + pj_dalloc(start); + } +} diff --git a/navit/src/tools/gpx2navit_txt/src/geodesic.h b/navit/src/tools/gpx2navit_txt/src/geodesic.h new file mode 100644 index 0000000..b9aa853 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/geodesic.h @@ -0,0 +1,51 @@ +#ifndef lint +/*static char GEODESIC_H_ID[] = "@(#)geodesic.h 4.3 95/08/19 GIE REL"; */ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _IN_GEOD_SET +# define GEOD_EXTERN extern +#else +# define GEOD_EXTERN +#endif + +GEOD_EXTERN struct geodesic { + double A; + double LAM1, PHI1, ALPHA12; + double LAM2, PHI2, ALPHA21; + double DIST; + double ONEF, FLAT, FLAT2, FLAT4, FLAT64; + int ELLIPSE; +} GEODESIC; + +# define geod_a GEODESIC.A +# define lam1 GEODESIC.LAM1 +# define phi1 GEODESIC.PHI1 +# define al12 GEODESIC.ALPHA12 +# define lam2 GEODESIC.LAM2 +# define phi2 GEODESIC.PHI2 +# define al21 GEODESIC.ALPHA21 +# define geod_S GEODESIC.DIST +# define geod_f GEODESIC.FLAT +# define onef GEODESIC.ONEF +# define f2 GEODESIC.FLAT2 +# define f4 GEODESIC.FLAT4 +# define ff2 GEODESIC.FLAT4 +# define f64 GEODESIC.FLAT64 +# define ellipse GEODESIC.ELLIPSE + + +GEOD_EXTERN int n_alpha, n_S; +GEOD_EXTERN double to_meter, fr_meter, del_alpha; + +void geod_set(int, char **); +void geod_for(void); +void geod_pre(void); +void geod_inv(void); + +#ifdef __cplusplus +} +#endif diff --git a/navit/src/tools/gpx2navit_txt/src/gpx2navit_txt.h b/navit/src/tools/gpx2navit_txt/src/gpx2navit_txt.h new file mode 100644 index 0000000..f5d64df --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/gpx2navit_txt.h @@ -0,0 +1,272 @@ +#ifndef GPX2SHP_H_INCLUDED +#define GPX2SHP_H_INCLUDED + +#define PROG gpx2navit_txt +#define FILENAMELENGTH 255 /* 255 is max length for dbf string column */ +#define COMMENTLENGTH 255 /* 255 is max length for dbf string column */ +#define NAMELENGTH 32 +#define TIMELENGTH 32 +#define TYPELENGTH 16 +#define BUFFSIZE 8192 +#define DATABUFSIZE 16 +#define failToWriteAttr(S, T) failToWriteAttrRep((S), (T),__FILE__, __LINE__ ) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "errorcode.h" +//#include "shapefil.h" + + +#define DEBUG 0 +/** + * make xml parent and child list + */ +typedef struct parent { + char *name; /** element name */ + struct parent *parentptr; + /** parent pointer */ +} parent; + +/** + * set attribute columns on/off + */ +typedef struct g2scolumns { +/** + * each member corresponds to attribute column of attribute table + */ + int name; + int cmt; + int desc; + int src; + int link; + int type; + int time; + int number; + int ele; + int magvar; + int geoidheight; + int sym; + int fix; + int sat; + int hdop; + int vdop; + int pdop; + int ageofdgpsdata; + int dgpsid; + int length; + int interval; + int speed; + int points; + int gpxline; +} g2scolumns; + +/** + * store each path attribute values for trackpoint and route. + */ +typedef struct pathattr { + char name[NAMELENGTH]; + char cmt[COMMENTLENGTH]; + char desc[COMMENTLENGTH]; + char src[COMMENTLENGTH]; + char link[FILENAMELENGTH]; + int number; + char type[TYPELENGTH]; + double length; + double interval; + double speed; + /* + double *x; + double *y; + double *z; + */ + double *point; + int count; +} pathattr; + +/** + * store each point attribute values. + */ +typedef struct g2sattr { +/** + * the structure cames from GPX1.1 format + */ + double lon; + double lat; + double minlon; + double minlat; + double maxlon; + double maxlat; + char name[NAMELENGTH]; + char cmt[COMMENTLENGTH]; + char desc[COMMENTLENGTH]; + char src[COMMENTLENGTH]; + char link[FILENAMELENGTH]; + char type[TYPELENGTH]; + char time[TIMELENGTH]; + int number; + double ele; + double magvar; + double geoidheight; + char sym[NAMELENGTH]; + char fix[NAMELENGTH]; + int sat; + double hdop; + double vdop; + double pdop; + double ageofdgpsdata; + int dgpsid; + char author[NAMELENGTH]; + char keywords[NAMELENGTH]; + char copyright[NAMELENGTH]; + int year; + char license[NAMELENGTH]; +} g2sattr; + +/** + * statistics structure + */ +typedef struct g2sstats { + int trkpoints; /** track point total count */ + int trkcount; /** track path total count */ + double trklength; /** track total length */ + int rtepoints; /** route point total count */ + int rtecount; /** route path totol count */ + double rtelength; /** route total length */ + int wptpoints; /** way point total count */ + int trkunconverted; /** unconverted track path count */ + int rteunconverted; /** unconverted route path count */ +} g2sstats; + +/** + * cluster of all dbfhandles + */ +//typedef struct dbfhandles { +// DBFHandle trk; /** for track */ +// DBFHandle wpt; /** for waypoint */ +// DBFHandle rte; /** for route */ +// DBFHandle trk_edg; /** for track each edge */ +// DBFHandle trk_pnt; /** for track each point */ +// DBFHandle rte_edg; /** for route each edge */ +// DBFHandle rte_pnt; /** for route each point */ +//} dbfhandles; + +/** + * cluster of all shphandles + */ +//typedef struct shphandles { +// SHPHandle trk; /** for track */ +// SHPHandle wpt; /** for waypoint */ +// SHPHandle rte; /** for route */ +// SHPHandle trk_edg; /** for track each edge */ +// SHPHandle trk_pnt; /** for track each point */ +// SHPHandle rte_edg; /** for route each edge */ +// SHPHandle rte_pnt; /** for route each point */ +//} shphandles; + +/** + * propaties structure for gpx2navit_txt + */ +typedef struct g2sprop { + int parseWpt; /** convert waypoint data or not */ + int parseTrk; /** convert track data or not */ + int parseRte; /** convert route data or not */ + int is3d; /** using 3D mode */ + int isEdge; /** convert path data as each separated path */ + int isPoint; /** convert path data as point */ + int isFast; /** fast mode that skips path check */ + int needsStats; /** shows statistics at last */ + int minpoints; /** minimum points to convert as a path */ + int minlength; /** minimum length to convert as a path */ + int mintime; /** minimum time to convert as a path */ + int verbose; /** verbose mode on/off */ + char *sourcefile; /** source .gpx file */ + char *output; /** output file base name */ + char *ellipsoid; /** ellipsoid type to calculate length */ + char *lengthUnit; /** length unit for attributes*/ + double length2meter;/** meter value of lenght unit */ + char *timeUnit; /** time unit for attributes */ + double time2sec; /** value to convert time unit to second */ + char *speedLengthUnit; + /** lenght unit to calculate speed*/ + double speed2meter; /** meter value of speedLengthUnit */ + char *speedTimeUnit;/** time unit to calculate speed */ + int speed2sec; /** value to convert speedTimeUnit to seconde */ + g2sstats *stats; /** convert statistics */ + g2scolumns *cols; /** attribute table column switch */ +} g2sprop; + +/** + * userdata structure between expat methods + */ +typedef struct parsedata { + int depth; /** xml path depth */ + char *databuf; /** character buffer in tags */ + char *bufptr; /** pointer to databuf to add '\0' to databuf */ + int failed; /** xml parse failed flag */ + int failedid; /** xml parse failed id */ + XML_Parser parser; /** xml parser itself*/ + parent *parent; /** pointer to parent node */ + parent *current; /** pointer to current node */ + FILE *fp; /** File handle to write out data points*/ +// shphandles *shps; /** .shp file cluster that is used in this program */ +// dbfhandles *dbfs; /** .dbf file cluster that is used in this program */ + g2sattr *attr; /** each point attributes */ + pathattr *pattr; /** each path attributes */ + g2sprop *prop; /** propaties for this program */ +} parsedata; + +/* utils.c */ +void checkEllpsUnit(char *unit); +double checkLengthUnit(char *unit); +int checkTimeUnit(char *unit); +double getTimeInterval(char *_t, char *t); +double getSpeed(double length, double ti, double to_meter, int to_sec); +double getDistance(double _x, double _y, double x, double y); +//void closeShpFiles(shphandles * shps); +//void closeDbfFiles(dbfhandles * dbfs); +void *myMallocRep(size_t size, const char *fileName, int line); + +/* misc.c */ +void failToWriteAttrRep(int iShape, int col, char *file, int line); +void showStats(g2sprop * prop); +void wipePathAttr(pathattr * pattr); +pathattr *createPathAttr(void); +void wipeAttr(g2sattr * attr); +void setColsDefault(g2scolumns * cols); +g2scolumns *createCols(void); +g2sattr *createAttr(void); +g2sprop *createProp(void); +void closeProp(g2sprop * prop); +//shphandles *createShps(void); +//dbfhandles *createDbfs(void); +parsedata *createParsedata(XML_Parser parser, g2sprop * prop); +void closeParsedata(parsedata * pdata); + +/* parser.c */ +void parseMain(g2sprop * pr); + +/* elementControl.c */ +void startElementControl(parsedata * pdata, const char *element, + const char **attr); +void endElementControl(parsedata * pdata, const char *element); + +/* setwpt.c */ +void setWpt( parsedata * pdata); + +/* setpath.c */ +void initPathAttr(pathattr * pattr, g2sattr * attr); +void setPathInterval(parsedata *pdata); +void setPathData(pathattr * parrt, g2sattr * attr); +void setPath( parsedata * pdata); + +/* setmetadata.c */ +void setMetadata(parsedata * pdata); + +#endif diff --git a/navit/src/tools/gpx2navit_txt/src/main.c b/navit/src/tools/gpx2navit_txt/src/main.c new file mode 100644 index 0000000..af8df87 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/main.c @@ -0,0 +1,389 @@ +#include "gpx2navit_txt.h" +#include "geodesic.h" + +void version(void); +void usage(char **argv); +void setDefault(g2sprop * prop); +void setOptions(int argc, char **argv, g2sprop * prop); + +/** + * Shows a version + */ +void version(void) +{ + fprintf(stdout, "gpx2navit_txt 0.1\n"); + fprintf(stdout, "\n"); + fprintf(stdout, "by Toshihiro Hiraoka\n"); + fprintf(stdout, " Petter Reinholdtsen\n"); +} + +/** + * Shows a usage message + */ +void usage(char **argv) +{ + fprintf(stdout, "Usage: %s gpxfile [options] [-o output basename]\n", + argv[0]); + fprintf(stdout, + "-o, --output Sets output basename. The default is (source file\n"); + fprintf(stdout, " name) - (extention name)\n"); + fprintf + (stdout, + "-w, --waypoints Converts only waypoints data from a gpx file.\n"); + fprintf(stdout, + "-t, --trackpoints Converts only trackpoints data from a gpx file.\n"); + fprintf(stdout, + "-r, --routes Converts only routes data from a gpx file.\n"); + fprintf(stdout, + "-a, --all Converts all types of data from a gpx file.(default)\n"); + fprintf(stdout, + "-e, --as-edge Makes a separated output by each edges.\n"); + fprintf(stdout, + "-p, --as-point Makes a separated output by each points.\n"); + fprintf(stdout, + "-s, --stats Shows simple statistics of the outputs.\n"); + fprintf(stdout, + "-b, --basic-columns Stores only basic data as attribures to \n"); + fprintf(stdout, + " reduce memory and storage usage.\n"); + fprintf(stdout, + " (ele, name, cmt, type, time, fix, sym and number).\n"); + fprintf(stdout, + "-L, --no-length Removes length column from a waypoint or trackpoint\n"); + fprintf(stdout, " attribute table.\n"); + fprintf + (stdout, + "-S, --no-speed Removes speed column from a waypoint or trackpoint\n"); + fprintf(stdout, " attribute table.\n"); + fprintf + (stdout, + "-T, --no-time Removes time column from an attribute table.\n"); + fprintf(stdout, + "-g, --gpxline Adds line number of GPX file as attribures.\n"); + fprintf + (stdout, + "-f, --fast Make it faster without any checks.\n"); + fprintf(stdout, + "-3, --3d Converts data using 3d format. (It's not compatible\n"); + fprintf(stdout, " for Arcview 3.x.)\n"); + fprintf(stdout, + " --min-points Sets path minimum points to convert for noise reduction.\n"); + fprintf(stdout, " Default is 2.\n"); + fprintf(stdout, + " --min-length Sets path minimum length to convert for noise reduction.\n"); + fprintf(stdout, " Default is 0.\n"); + fprintf(stdout, + " --min-time Sets path minimum time period to convert for noise\n"); + fprintf(stdout, " reduction.\n"); + fprintf(stdout, " Default is 0.\n"); + fprintf(stdout, + " --length-unit Sets length unit from m,km,feet,mi and etc.\n"); + fprintf(stdout, " The default is m.\n"); + fprintf(stdout, + " You can see the unit list from \"geod -lu\" command.\n"); + fprintf + (stdout, + " --time-unit Sets time unit. The default is sec.\n"); + fprintf(stdout, + " You can set from day, hour, min and sec.\n"); + fprintf(stdout, + " --speed-length-unit Sets length unit for speed.\n"); + fprintf(stdout, " The default is km.\n"); + fprintf(stdout, + " You can see the unit list from \"geod -lu\" command.\n"); + fprintf(stdout, + " --speed-time-unit Sets time unit for speed calulation. Default is hour.\n"); + fprintf(stdout, + " You can set from day, hour, min and sec.\n"); + fprintf(stdout, + " --length-ellipsoid Sets length ellipsoid like UGS84, clrk66. The default is\n"); + fprintf(stdout, " UGS84.\n"); + fprintf + (stdout, + " You can see the unit list from \"geod -le\" command.\n"); + fprintf(stdout, "-v, --verbose Gives many messages.\n"); + fprintf(stdout, " --version Shows version.\n"); + fprintf(stdout, "-h, --help Shows this list.\n"); +} + +/** + * Sets default values to the properties when there is no user setting. + */ +void setDefault(g2sprop * prop) +{ + char *pargv[2]; + int pargc = 2; + char *ellps; + /* if there are no options like -p,-w,-e, sets as -a */ + if (!(prop->parseWpt | prop->parseTrk | prop->parseRte)) { + prop->parseWpt = 1; + prop->parseTrk = 1; + prop->parseRte = 1; + } + /* if there is no output setting, sets it as [sourcefile name] - ".gpx" */ + if (prop->output == NULL) { + char *dot = strrchr(prop->sourcefile, '.'); + prop->output = + (char *) malloc(sizeof(char) * strlen(prop->sourcefile) + 1); + if (0 == strcmp(dot, ".gpx")) { + int len = dot - prop->sourcefile; + strncpy(prop->output, prop->sourcefile, len); + prop->output[len] = 0; + } else { + fprintf(stderr, + "The source file doesn't have .gpx extension.\n"); + exit(ERR_ISNOTGPX); + } + } + /* sets ellipsoid "WGS84" */ + if (prop->ellipsoid == NULL) { + prop->ellipsoid = (char *) malloc(sizeof(char) * 7); + strcpy(prop->ellipsoid, "WGS84"); + } + /* sets lengthUnit "m" */ + if (prop->lengthUnit == NULL) { + prop->lengthUnit = (char *) malloc(sizeof(char) * 2); + strcpy(prop->lengthUnit, "m"); + } + /* sets timeUnit "sec" */ + if (prop->timeUnit == NULL) { + prop->timeUnit = (char *) malloc(sizeof(char) * 4); + strcpy(prop->timeUnit, "sec"); + } + /* sets speedLengthUnit "km" */ + if (prop->speedLengthUnit == NULL) { + prop->speedLengthUnit = (char *) malloc(sizeof(char) * 3); + strcpy(prop->speedLengthUnit, "km"); + } + /* sets speedTimeUnit "hour" */ + if (prop->speedTimeUnit == NULL) { + prop->speedTimeUnit = (char *) malloc(sizeof(char) * 5); + strcpy(prop->speedTimeUnit, "hour"); + } + /* sets ellipsoid setting to geod* programs */ + ellps = malloc(sizeof(char) * (strlen(prop->ellipsoid) + 8)); + strcpy(ellps, "+ellps="); + strcat(ellps, prop->ellipsoid); + pargv[0] = ellps; + pargv[1] = prop->lengthUnit; + checkEllpsUnit(prop->ellipsoid); + prop->length2meter = checkLengthUnit(prop->lengthUnit); + prop->time2sec = checkTimeUnit(prop->timeUnit); + prop->speed2meter = checkLengthUnit(prop->speedLengthUnit); + prop->speed2sec = checkTimeUnit(prop->speedTimeUnit); + geod_set(pargc, pargv); + if (prop->verbose) { + printf("source filename:\t%s\n", prop->sourcefile); + printf("output file base name:\t%s\n", prop->output); + } + free(ellps); +} + +/** + * Set options from command arguments + */ +void setOptions(int argc, char **argv, g2sprop * prop) +{ + int result; + /* option struct for getopt_long */ + struct option const long_options[] = { + {"waypoints", no_argument, 0, 'w'}, + {"trackpoints", no_argument, 0, 't'}, + {"routes", no_argument, 0, 'r'}, + {"output", required_argument, 0, 'o'}, + {"as-edge", no_argument, 0, 'e'}, + {"as-point", no_argument, 0, 'p'}, + {"min-points", required_argument, 0, 'P'}, + {"min-length", required_argument, 0, 'l'}, + {"min-time", required_argument, 0, 'm'}, + {"stats", no_argument, 0, 's'}, + {"basic-columns", no_argument, 0, 'b'}, + {"fast", no_argument, 0, 'f'}, + {"length-unit", required_argument, 0, '4'}, + {"time-unit", required_argument, 0, '8'}, + {"length-ellipsoid", required_argument, 0, '7'}, + {"speed-length-unit", required_argument, 0, '5'}, + {"speed-time-unit", required_argument, 0, '6'}, + {"no-speed", no_argument, 0, 'S'}, + {"no-length", no_argument, 0, 'L'}, + {"no-time", no_argument, 0, 'T'}, + {"verbose", no_argument, 0, 'v'}, + {"gpxline", no_argument, 0, 'g'}, + {"all", no_argument, 0, 'a'}, + {"version", no_argument, 0, 'V'}, + {"help", no_argument, 0, '?'}, + {0, no_argument, 0, '0'}, + }; + if (argc <= 1) { + fprintf(stderr, "There is no argument.\n"); + usage(argv); + exit(ERR_NOARGS); + } + /* set option attributes */ + while ((result = + getopt_long(argc, argv, "3wtrao:epfP:l:m:bS4:5:6:7:8:LTSsvg0", + long_options, NULL)) != -1) { + switch (result) { + case '3': /* 3d output */ + prop->is3d = 1; + break; + case 'w': /* converts only waypoint */ + prop->parseWpt = 1; + break; + case 't': /* converts only trackpoint */ + prop->parseTrk = 1; + break; + case 'r': /* converts only route */ + prop->parseRte = 1; + break; + case 'a': /* converts all */ + prop->parseWpt = 1; + prop->parseTrk = 1; + prop->parseRte = 1; + break; + case 'o': /* sets basename of output file */ + prop->output = + (char *) malloc(sizeof(char) * strlen(optarg) + 1); + strcpy(prop->output, optarg); + break; + case 'e': /* make output by each edges */ + if (prop->isEdge) { + fprintf(stderr, "option -e cannot use with -f\n"); + exit(ERR_OPTIONCONFRICT); + } + prop->isEdge = 1; + break; + case 'p': /* make output by each edges */ + prop->isPoint = 1; + break; + case 'f': /* make it faster */ + if (prop->isEdge) { + fprintf(stderr, "option -f cannot use with -e\n"); + exit(ERR_OPTIONCONFRICT); + } + prop->isFast = 1; + prop->cols->desc = 0; + prop->cols->src = 0; + prop->cols->link = 0; + prop->cols->magvar = 0; + prop->cols->geoidheight = 0; + prop->cols->sat = 0; + prop->cols->hdop = 0; + prop->cols->vdop = 0; + prop->cols->pdop = 0; + prop->cols->ageofdgpsdata = 0; + prop->cols->dgpsid = 0; + prop->cols->length = 0; + prop->cols->interval = 0; + prop->cols->speed = 0; + break; + case 'P': /* sets minimun points as a path */ + prop->minpoints = atoi(optarg); + break; + case 'l': /* sets minimun length as a path */ + prop->minlength = atoi(optarg); + break; + case 'm': /* sets minimun time as a path */ + prop->mintime = atoi(optarg); + break; + case 'b': /* use only some columns */ + prop->cols->desc = 0; + prop->cols->src = 0; + prop->cols->link = 0; + prop->cols->magvar = 0; + prop->cols->geoidheight = 0; + prop->cols->sat = 0; + prop->cols->hdop = 0; + prop->cols->vdop = 0; + prop->cols->pdop = 0; + prop->cols->ageofdgpsdata = 0; + prop->cols->dgpsid = 0; + prop->cols->length = 0; + prop->cols->interval = 0; + prop->cols->speed = 0; + break; + case 'S': /* doesn't make speed column */ + prop->cols->speed = 0; + break; + case '4': /* sets length unit */ + prop->lengthUnit = malloc(sizeof(char) * (strlen(optarg) + 1)); + strcpy(prop->lengthUnit, optarg); + break; + case '5': /* sets length unit for calculating speed */ + prop->speedLengthUnit = + malloc(sizeof(char) * (strlen(optarg) + 1)); + strcpy(prop->speedLengthUnit, optarg); + break; + case '6': /* sets time unit for calculating speed */ + prop->speedTimeUnit = + malloc(sizeof(char) * (strlen(optarg) + 1)); + strcpy(prop->speedTimeUnit, optarg); + break; + case '7': /* sets ellipsoid for calculating length */ + prop->ellipsoid = malloc(sizeof(char) * (strlen(optarg) + 1)); + strcpy(prop->ellipsoid, optarg); + break; + case '8': /* sets time unit */ + prop->timeUnit = malloc(sizeof(char) * (strlen(optarg) + 1)); + strcpy(prop->timeUnit, optarg); + break; + case 'L': /* doesn't make length column */ + prop->cols->length = 0; + break; + case 'T': /* doesn't make time column */ + prop->cols->interval = 0; + break; + case 's': /* shows source file stats */ + prop->needsStats = 1; + break; + case 'v': /* verbose mode */ + prop->verbose = 1; + break; + case 'V': /* shows version */ + version(); + exit(EXIT_SUCCESS); + break; + case 'g': /* adds gpx line number column */ + prop->cols->gpxline = 1; + break; + case ':': + usage(argv); + exit(ERR_WRONGOPTION); + break; + case '0': + usage(argv); + exit(ERR_WRONGOPTION); + break; + default: + usage(argv); + exit(ERR_WRONGOPTION); + break; + } + } + /* gets a source file name */ + if(argv[optind] == NULL) { + fprintf(stderr, "There is no gpxfile description.\n"); + usage(argv); + exit(ERR_WRONGOPTION); + } + prop->sourcefile = malloc(sizeof(char) * (strlen(argv[optind]) + 1)); + /** @note needs to change here to support + * a several files convertion */ + strcpy(prop->sourcefile, argv[optind]); + setDefault(prop); +} + +/** + * Main + */ +int main(int argc, char **argv) +{ + g2sprop *prop; + prop = createProp(); + setOptions(argc, argv, prop); + parseMain(prop); + if (prop->needsStats) + showStats(prop); + closeProp(prop); + return (0); +} diff --git a/navit/src/tools/gpx2navit_txt/src/misc.c b/navit/src/tools/gpx2navit_txt/src/misc.c new file mode 100644 index 0000000..b5fddd3 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/misc.c @@ -0,0 +1,344 @@ +#include "gpx2navit_txt.h" + +void failToWriteAttrRep(int iShape, int col, char *file, int line); +void showStats(g2sprop * prop); +void wipePathAttr(pathattr * pattr); +pathattr *createPathAttr(void); +void wipeAttr(g2sattr * attr); +void setColsDefault(g2scolumns * cols); +g2scolumns *createCols(void); +g2sattr *createAttr(void); +g2sprop *createProp(void); +void closeProp(g2sprop * prop); +//shphandles *createShps(void); +//dbfhandles *createDbfs(void); +parsedata *createParsedata(XML_Parser parser, g2sprop * prop); +void closeParsedata(parsedata * pdata); + +/** + * message when fail to write attribute + */ +void failToWriteAttrRep(int iShape, int col, char *file, int line) +{ + printf("Fail to write a attribute at %s:%i. shapeid:%i col:%i\n", file, + line, iShape, col); +} + +/** + * shows short statistics + */ +void showStats(g2sprop * prop) +{ + g2sstats *stats = prop->stats; + double ratio; + if (prop->needsStats) { + if (prop->parseTrk) { + if (stats->trkunconverted != 0) { + ratio = + (double) stats->trkunconverted / (stats->trkcount + + stats-> + trkunconverted) * + 100; + } else { + ratio = 0; + } + printf("Track Points:\n"); + printf("\ttrack count:\t%i\n", stats->trkcount); + printf("\tpoint count:\t%i\n", stats->trkpoints); + if (!prop->isFast) { + printf("\ttotal length:\t%f\n", stats->trklength); + printf("\tunconverted:\t%i(%5.2f%%)\n", + stats->trkunconverted, ratio); + } + } + if (prop->parseRte) { + if (stats->rteunconverted != 0) { + ratio = + (double) stats->rteunconverted / (stats->rtecount + + stats-> + rteunconverted) * + 100; + } else { + ratio = 0; + } + printf("Routes:\n"); + printf("\troute count:\t%i\n", stats->rtecount); + printf("\tpoint count:\t%i\n", stats->rtepoints); + if (!prop->isFast) { + printf("\ttotal length:\t%f\n", stats->rtelength); + printf("\tunconverted:\t%i(%5.2f%%)\n", + stats->rteunconverted, ratio); + } + } + if (prop->parseWpt) { + printf("Waypoints:\n"); + printf("\tpoint count:\t%i\n", stats->wptpoints); + } + } +} + +/** + * clears a path attribute structure + */ +void wipePathAttr(pathattr * pattr) +{ + pattr->name[0] = '\0'; + pattr->cmt[0] = '\0'; + pattr->desc[0] = '\0'; + pattr->src[0] = '\0'; + pattr->link[0] = '\0'; + pattr->number = 0; + pattr->type[0] = '\0'; + pattr->length = 0; + pattr->interval = 0; + pattr->speed = 0; + //pattr->point = NULL; + pattr->count = 0; +} + +/** + * creates a new path attribute + */ +pathattr *createPathAttr(void) +{ + pathattr *pattr; + pattr = (pathattr *) malloc(sizeof(pathattr)); + wipePathAttr(pattr); + return pattr; +} + +/** + * clears a element attribute structure + */ +void wipeAttr(g2sattr * attr) +{ + attr->lon = 0; + attr->lat = 0; + attr->minlon = 0; + attr->minlat = 0; + attr->maxlon = 0; + attr->maxlat = 0; + attr->name[0] = '\0'; + attr->cmt[0] = '\0'; + attr->desc[0] = '\0'; + attr->src[0] = '\0'; + attr->link[0] = '\0'; + attr->type[0] = '\0'; + attr->time[0] = '\0'; + attr->number = 0; + attr->ele = 0; + attr->magvar = 0; + attr->geoidheight = 0; + attr->sym[0] = '\0'; + attr->fix[0] = '\0'; + attr->sat = 0; + attr->hdop = 0; + attr->vdop = 0; + attr->pdop = 0; + attr->ageofdgpsdata = 0; + attr->dgpsid = 0; + attr->author[0] = '\0'; + attr->keywords[0] = '\0'; + attr->copyright[0] = '\0'; + attr->year = 0; + attr->license[0] = '\0'; + attr->minlat = 0; + attr->minlon = 0; + attr->maxlat = 0; + attr->maxlon = 0; +} + +/** + * sets default values to a column properties. + */ +void setColsDefault(g2scolumns * cols) +{ + cols->name = 1; + cols->cmt = 1; + cols->desc = 1; + cols->src = 1; + cols->link = 1; + cols->type = 1; + cols->time = 1; + cols->number = 1; + cols->ele = 1; + cols->magvar = 1; + cols->geoidheight = 1; + cols->sym = 1; + cols->fix = 1; + cols->sat = 1; + cols->hdop = 1; + cols->vdop = 1; + cols->pdop = 1; + cols->ageofdgpsdata = 1; + cols->dgpsid = 1; + cols->length = 1; + cols->interval = 1; + cols->speed = 1; + cols->points = 1; + cols->gpxline = 0; +} + +/** + * creates a column structure + */ +g2scolumns *createCols(void) +{ + g2scolumns *cols; + cols = (g2scolumns *) malloc(sizeof(g2scolumns)); + setColsDefault(cols); + return cols; +} + +/** + * creates a element attribute structure. + */ +g2sattr *createAttr(void) +{ + g2sattr *attr; + attr = (g2sattr *) malloc(sizeof(g2sattr)); + wipeAttr(attr); + return attr; +} + +/** + * creates a properties structure for gpx2shp + */ +g2sprop *createProp(void) +{ + g2sprop *prop; + g2sstats *stats; + g2scolumns *cols; + prop = malloc(sizeof(g2sprop)); + stats = malloc(sizeof(g2sstats)); + cols = createCols(); + prop->stats = stats; + prop->parseWpt = 0; + prop->parseTrk = 0; + prop->parseRte = 0; + prop->minpoints = 2; + prop->minlength = 0; + prop->mintime = 0; + prop->is3d = 0; + prop->isEdge = 0; + prop->isPoint = 0; + prop->isFast = 0; + prop->needsStats = 0; + prop->verbose = 0; + prop->output = NULL; + prop->ellipsoid = NULL; + prop->lengthUnit = NULL; + prop->speedLengthUnit = NULL; + prop->speedTimeUnit = NULL; + prop->timeUnit = NULL; + prop->stats->trkcount = 0; + prop->stats->trkpoints = 0; + prop->stats->trklength = 0; + prop->stats->trkunconverted = 0; + prop->stats->rtecount = 0; + prop->stats->rtepoints = 0; + prop->stats->rtelength = 0; + prop->stats->rteunconverted = 0; + prop->stats->wptpoints = 0; + prop->cols = cols; + return prop; +} + +/** + * close and free a propertires structure + */ +void closeProp(g2sprop * prop) +{ + free(prop->stats); + free(prop->sourcefile); + free(prop->ellipsoid); + free(prop->timeUnit); + free(prop->speedLengthUnit); + free(prop->speedTimeUnit); + free(prop->lengthUnit); + free(prop->output); + free(prop->cols); + free(prop); +} + +/** + * creates a shapehandles structure + */ +//shphandles *createShps(void) +//{ +// shphandles *shps; +// shps = malloc(sizeof(shphandles)); +// shps->trk = NULL; +// shps->wpt = NULL; +// shps->rte = NULL; +// shps->trk_edg = NULL; +// shps->rte_edg = NULL; +// shps->trk_pnt = NULL; +// shps->rte_pnt = NULL; +// return shps; +//} + +/** + * creates a dbfhandles structure + */ +/* dbfhandles *createDbfs(void) +{ + dbfhandles *dbfs; + dbfs = malloc(sizeof(dbfhandles)); + dbfs->trk = NULL; + dbfs->wpt = NULL; + dbfs->rte = NULL; + dbfs->trk_edg = NULL; + dbfs->rte_edg = NULL; + dbfs->trk_pnt = NULL; + dbfs->rte_pnt = NULL; + return dbfs; +} */ + +/** + * creates a parse structure + */ +parsedata *createParsedata(XML_Parser parser, g2sprop * prop) +{ + parsedata *pdata = (parsedata *) malloc(sizeof(parsedata)); + pdata->fp = NULL; + //shphandles *shps = createShps(); + //dbfhandles *dbfs = createDbfs(); + pathattr *pattr = createPathAttr(); + g2sattr *attr = createAttr(); + parent *p = (parent *) malloc(sizeof(parent)); + parent *c = (parent *) malloc(sizeof(parent)); + p->name = NULL; + p->parentptr = NULL; + c->name = "root"; + c->parentptr = p; + pdata->depth = 0; + pdata->databuf = malloc(sizeof(char) * DATABUFSIZE); + pdata->bufptr = NULL; + pdata->failed = 0; + pdata->failedid = 0; + pdata->parser = parser; + pdata->parent = p; + pdata->current = c; + //pdata->shps = shps; + //pdata->dbfs = dbfs; + pdata->prop = prop; + pdata->pattr = pattr; + pdata->attr = attr; + return pdata; +} + +/* + * close and free resoures + */ +void closeParsedata(parsedata * pdata) +{ + //free(pdata->shps); + //free(pdata->dbfs); + free(pdata->parent); + free(pdata->current); + free(pdata->databuf); + free(pdata->attr); + free(pdata->pattr); + free(pdata); +} diff --git a/navit/src/tools/gpx2navit_txt/src/parser.c b/navit/src/tools/gpx2navit_txt/src/parser.c new file mode 100644 index 0000000..686b3b0 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/parser.c @@ -0,0 +1,125 @@ +#include "gpx2navit_txt.h" + +void charHandle(void *userdata, const XML_Char * data, int length); +void startElement(void *userdata, const char *element, const char **attr); +void endElement(void *userdata, const char *element); +void parseMain(g2sprop * prop); + +/** + * a handler to parse charctor data on expat + */ +void charHandle(void *userdata, const XML_Char * data, int length) +{ + static int bufsize = DATABUFSIZE; + parsedata *pdata = (parsedata *) userdata; + if (bufsize < length) { + pdata->databuf = + realloc(pdata->databuf, sizeof(char) * (length + 1)); + bufsize = length; + } + strncpy(pdata->databuf, data, length); + pdata->bufptr = pdata->databuf; + pdata->bufptr += length; + *pdata->bufptr = '\0'; +} + +/** + * a handler when a element starts + */ +void startElement(void *userdata, const char *element, const char **attr) +{ + parsedata *pdata = (parsedata *) userdata; + pdata->parent = pdata->current; + pdata->current = malloc(sizeof(parent)); + pdata->current->name = malloc(sizeof(char) * (strlen(element) + 1)); + strcpy(pdata->current->name, element); + pdata->current->parentptr = pdata->parent; + startElementControl(pdata, element, attr); + if (pdata->prop->verbose) { + int i; + for (i = 0; i < pdata->depth; i++) + printf(" "); + printf("<%s>: ", element); + for (i = 0; attr[i]; i += 2) { + printf(" %s='%s'", attr[i], attr[i + 1]); + } + printf("\n"); + } + pdata->depth++; +} + +/** + * a handler when a element ends + */ +void endElement(void *userdata, const char *element) +{ + parsedata *pdata = (parsedata *) userdata; + endElementControl(pdata, element); + pdata->depth--; + if (pdata->prop->verbose) { + int i; + for (i = 0; i < pdata->depth; i++) + printf(" "); + printf(":%s\n ", element,pdata->parent->name); + } + free(pdata->current->name); + free(pdata->current); + pdata->current = pdata->parent; + pdata->parent = pdata->parent->parentptr; +} + +void parseMain(g2sprop * prop) +{ + FILE *fp; + char buff[BUFFSIZE]; + XML_Parser parser; + parsedata *pdata; + fp = fopen(prop->sourcefile, "r"); + if (fp == NULL) { + fprintf(stderr, "Cannot open gpx file: %s\n", prop->sourcefile); + exit(ERR_CANNOTOPEN); + } + parser = XML_ParserCreate(NULL); + if (!parser) { + fprintf(stderr, "Couldn't allocate memory for parser\n"); + exit(ERR_OUTOFMEMORY); + } + pdata = createParsedata(parser, prop); + + char *output_wpt = + (char *) malloc(sizeof(char) * (strlen(pdata->prop->output) + 9)); + strcpy(output_wpt, pdata->prop->output); + strcat(output_wpt, "_nav.txt"); + pdata->fp = fopen(output_wpt,"w"); + if (pdata->fp == NULL) + { + //todo + fprintf(stderr,"Failure opening File %s for writing",output_wpt); + exit(1); + } + free(output_wpt); + XML_SetUserData(parser, pdata); + XML_SetElementHandler(parser, startElement, endElement); + XML_SetCharacterDataHandler(parser, charHandle); + for (;;) { + int done; + int len; + fgets(buff, BUFFSIZE, fp); + len = (int) strlen(buff); + if (ferror(fp)) { + fprintf(stderr, "Read error file: %s\n", prop->sourcefile); + exit(ERR_READERROR); + } + done = feof(fp); + if (done) + break; + if (!XML_Parse(parser, buff, len, done)) { + fprintf(stderr, "Parse error at line %d:\n%s\n", + XML_GetCurrentLineNumber(parser), + XML_ErrorString(XML_GetErrorCode(parser))); + exit(ERR_PARSEERROR); + } + } + fclose(pdata->fp); //close out file + closeParsedata(pdata); +} diff --git a/navit/src/tools/gpx2navit_txt/src/setmeta.c b/navit/src/tools/gpx2navit_txt/src/setmeta.c new file mode 100644 index 0000000..9d23ffd --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/setmeta.c @@ -0,0 +1,54 @@ +#include "gpx2navit_txt.h" + +/** + * store gpx metadata into text file + */ +void setMetadata(parsedata * pdata) +{ + g2sprop *prop = pdata->prop; + g2sattr *attr = pdata->attr; + FILE *metafile; + char *output = malloc(sizeof(char) * (strlen(prop->output) + 10)); + strcpy(output, prop->output); + strcat(output, "_meta.txt"); + metafile = fopen(output, "w"); + if (metafile == NULL) { + fprintf(stderr, "Cannot create file: %s\n", output); + exit(ERR_CREATEFILE); + } + if (attr->name) { + fprintf(metafile, "name\t%s\n", attr->name); + } + if (attr->desc) { + fprintf(metafile, "description\t%s\n", attr->desc); + } + if (attr->author) { + fprintf(metafile, "author\t%s\n", attr->author); + } + if (attr->copyright) { + fprintf(metafile, "copyright\t%s\n", attr->copyright); + } + if (attr->link) { + fprintf(metafile, "link\t%s\n", attr->link); + } + if (attr->time) { + fprintf(metafile, "time\t%s\n", attr->time); + } + if (attr->keywords) { + fprintf(metafile, "keywords\t%s\n", attr->keywords); + } + if (attr->minlat) { + fprintf(metafile, "min latitude\t%f\n", attr->minlat); + } + if (attr->minlon) { + fprintf(metafile, "min longitude\t%f\n", attr->minlon); + } + if (attr->maxlat) { + fprintf(metafile, "max latitude\t%f\n", attr->maxlat); + } + if (attr->maxlon) { + fprintf(metafile, "max longitude\t%f\n", attr->maxlon); + } + fclose(metafile); + free(output); +} diff --git a/navit/src/tools/gpx2navit_txt/src/setpath.c b/navit/src/tools/gpx2navit_txt/src/setpath.c new file mode 100644 index 0000000..5402e4e --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/setpath.c @@ -0,0 +1,241 @@ +#include "gpx2navit_txt.h" + +void initPathAttr(pathattr * pattr, g2sattr * attr); +void setEdge(parsedata * pdata, double _x, double _y, double _z, + double length, double interval, double speed); +void setPathInterval(parsedata * pdata); +void setPathData(pathattr * pattr, g2sattr * attr); +void countUnconverted(parsedata * pdata); +void countPath(parsedata * pdata); +int checkPath(parsedata * pdata); +void setPath( parsedata * pdata); + + + +/** + * initialize a path attribute + */ +void initPathAttr(pathattr * pattr, g2sattr * attr) +{ + strcpy(pattr->name, attr->name); + strcpy(pattr->cmt, attr->cmt); + strcpy(pattr->desc, attr->desc); + strcpy(pattr->src, attr->src); + strcpy(pattr->link, attr->link); + pattr->number = attr->number; + strcpy(pattr->type, attr->type); + pattr->length = 0; + pattr->interval = 0; + pattr->speed = 0; + pattr->count = 0; + pattr->point = NULL; +} + + +/** + * set edge data and store it + */ +void setEdge(parsedata * pdata, double _x, double _y, double _z, + double length, double interval, double speed) +{ + pathattr *pattr = pdata->pattr; + static int isFirstTrkAsEdge = 1; + static int isFirstRteAsEdge = 1; + double x[2], y[2], z[2]; + double _length, _interval, _speed; + if (!strcmp(pdata->current->name, "trkpt")) { + if (isFirstTrkAsEdge) { + isFirstTrkAsEdge = 0; + } + } else { + if (isFirstRteAsEdge) { + isFirstRteAsEdge = 0; + } + } + _length = pattr->length; + _interval = pattr->interval; + _speed = pattr->speed; + pattr->length = length; + pattr->interval = interval; + pattr->speed = speed; + x[0] = _x; + y[0] = _y; + z[0] = _z; + x[1] = pdata->attr->lon; + y[1] = pdata->attr->lat; + z[1] = pdata->attr->ele; + if (pdata->prop->is3d) { + } else { + } + pattr->length = _length; + pattr->interval = _interval; + pattr->speed = _speed; +} + +/** + * sets interval data between two track points + */ +void setPathInterval(parsedata * pdata) +{ + pathattr *pattr = pdata->pattr; + g2sattr *attr = pdata->attr; + g2sprop *prop = pdata->prop; + static char _t[TIMELENGTH]; + double intvl = 0; + static double _x, _y, _z; + double leng = 0; + double spd; + if (pattr->count == 1) { + strcpy(_t, attr->time); + } else { + /* time interval */ + intvl = getTimeInterval(_t, attr->time); + pattr->interval = pattr->interval + intvl; + strcpy(_t, attr->time); + /* length interval */ + leng = getDistance(_x, _y, attr->lon, attr->lat); + pattr->length = pattr->length + leng; + /* interval speed */ + spd = getSpeed(leng, intvl, prop->speed2meter, prop->speed2sec); + /* sets edge data */ + if (prop->isEdge) { + setEdge(pdata, _x, _y, _z, leng, intvl, spd); + } + } + _x = attr->lon; + _y = attr->lat; + _z = attr->ele; +} + +/** + * sets each track point data in array. + */ +void setPathData(pathattr * pattr, g2sattr * attr) +{ + const int reallocsize = 100; + if (pattr->count == 0) { + pattr->point = malloc(sizeof(double) * 3 * reallocsize); + } + if ((pattr->count % reallocsize) == 0) { + pattr->point = realloc(pattr->point, + sizeof(double) * 3 * (pattr->count + + reallocsize)); + } + pattr->point[pattr->count * 3] = attr->lon; + pattr->point[pattr->count * 3 + 1] = attr->lat; + pattr->point[pattr->count * 3 + 2] = attr->ele; + pattr->count++; +} + +/** + * counts paths that wasn't converted + */ +void countUnconverted(parsedata * pdata) +{ + g2sstats *stats = pdata->prop->stats; + if (!strcmp(pdata->current->name, "trkseg")) + stats->trkunconverted++; + else + stats->rteunconverted++; +} + +/** + * counts paths + */ +void countPath(parsedata * pdata) +{ + g2sstats *stats = pdata->prop->stats; + pathattr *pattr = pdata->pattr; + if (!strcmp(pdata->current->name, "trkseg")) { + stats->trkcount++; + stats->trklength += pattr->length; + stats->trkpoints += pattr->count; + } else { + stats->rtecount++; + stats->rtelength += pattr->length; + stats->rtepoints += pattr->count; + } +} + +int checkPath(parsedata * pdata) +{ + pathattr *pattr = pdata->pattr; + g2sprop *prop = pdata->prop; + /* check point count. */ + if (pattr->count < prop->minpoints) { + fprintf + (stderr, + "gpx2navit_txt:%s:%i track was not converted because of less then %d points. \n", + prop->sourcefile, XML_GetCurrentLineNumber(pdata->parser), + prop->minpoints); + countUnconverted(pdata); + return 0; + /* check path length */ + } else if (pattr->length < prop->minlength * prop->length2meter) { + fprintf + (stderr, + "gpx2navit_txt:%s:%i track was not converted because it is shorter than %dm.\n", + prop->sourcefile, XML_GetCurrentLineNumber(pdata->parser), + prop->minlength); + countUnconverted(pdata); + return 0; + /* check path time */ + } else if (pattr->interval < prop->mintime * prop->time2sec) { + fprintf + (stderr, + "gpx2navit_txt:%s:%i track was not converted because it is shorter than %d sed.\n", + prop->sourcefile, XML_GetCurrentLineNumber(pdata->parser), + prop->mintime); + countUnconverted(pdata); + return 0; + /* check path speed */ + } else if (pattr->speed == .0) { + fprintf + (stderr, + "gpx2navit_txt:%s:%i track was not converted because no move recorded.\n", + prop->sourcefile, XML_GetCurrentLineNumber(pdata->parser)); + countUnconverted(pdata); + return 0; + } + return 1; +} + +/** + * saves path data into files. + */ +void setPath( parsedata * pdata) +{ + pathattr *pattr = pdata->pattr; + g2sprop *prop = pdata->prop; + int isOk = 0; + pattr->speed = + getSpeed(pattr->length, pattr->interval, prop->speed2meter, + prop->speed2sec); + if (prop->isFast) { + isOk = 1; + } else { + isOk = checkPath(pdata); + } + if (isOk) { + double x[pattr->count]; + double y[pattr->count]; + double z[pattr->count]; + int i; + fprintf(pdata->fp,"type=track label=\"%s\" desc=\"%s\" type=\"%s\"\ length=\"%5.3f\" count=\"%5d\"\n" + ,pdata->pattr->name,pdata->pattr->desc, + pdata->pattr->type,pdata->pattr->length, + pdata->pattr->count); + + for (i = 0; i < pattr->count; i++) { + x[i] = pattr->point[i * 3]; + y[i] = pattr->point[i * 3 + 1]; + z[i] = pattr->point[i * 3 + 2]; + fprintf(pdata->fp,"%3.6f %4.6f\n",x[i],y[i]); + } + if (pdata->prop->is3d) { + } else { + } + countPath(pdata); + } + free(pattr->point); +} diff --git a/navit/src/tools/gpx2navit_txt/src/setwpt.c b/navit/src/tools/gpx2navit_txt/src/setwpt.c new file mode 100644 index 0000000..3624593 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/setwpt.c @@ -0,0 +1,52 @@ +#include "gpx2navit_txt.h" + +void setWpt(parsedata * pdata); + +/** + * save point objects in *_wpt or *_pnt file + */ +void setWpt( parsedata * pdata) +{ + double x[1], y[1], z[1]; + x[0] = pdata->attr->lon; + y[0] = pdata->attr->lat; + z[0] = pdata->attr->ele; + if (pdata->prop->is3d) { + //nothing at the moment + } else { + //do not know if i will change something here + } + // Write attributes to file first line waypoint-info, second line coords + char poi_type[20]="poi_attraction"; + if (!strcmp(pdata->attr->type,"Geocache|Traditional Cache")) + strcpy(poi_type,"poi_gc_tradi"); + if (!strcmp(pdata->attr->type,"Geocache|Multi-cache")) + strcpy(poi_type,"poi_gc_multi"); + if (!strcmp(pdata->attr->type,"Geocache|Unknown Cache")) + strcpy(poi_type,"poi_gc_mystery"); + if (!strcmp(pdata->attr->type,"Geocache|Event Cache")) + strcpy(poi_type,"poi_gc_event"); + if (!strcmp(pdata->attr->type,"Geocache")) //for OC + strcpy(poi_type,"poi_gc_tradi"); + if (!strcmp(pdata->attr->type,"Waypoint|Parking Area")) + strcpy(poi_type,"poi_car_parking"); + if (!strcmp(pdata->attr->type,"Waypoint|Question to Answer")) + strcpy(poi_type,"poi_gc_question"); + if (!strcmp(pdata->attr->type,"Waypoint|Reference Point")) + strcpy(poi_type,"poi_gc_reference"); + if (!strcmp(pdata->attr->type,"Waypoint|Stages of a Multicache")) + strcpy(poi_type,"poi_gc_stages"); + + //generate the file + fprintf(pdata->fp,"type=%s label=\"%s\" desc=\"%s\" gc_type=\"%s\"\n", + poi_type,pdata->attr->name,pdata->attr->desc,pdata->attr->type); + fprintf(pdata->fp,"%3.6f %4.6f\n",x[0],y[0]); + + //writeWptAttribute(hDBF, pdata, iShape); + if (!strcmp(pdata->current->name, "wpt")) { + pdata->prop->stats->wptpoints++; + } + return; +} + + diff --git a/navit/src/tools/gpx2navit_txt/src/utils.c b/navit/src/tools/gpx2navit_txt/src/utils.c new file mode 100644 index 0000000..b9b7247 --- /dev/null +++ b/navit/src/tools/gpx2navit_txt/src/utils.c @@ -0,0 +1,199 @@ +#include "gpx2navit_txt.h" +#include "projects.h" +#include "geodesic.h" + +double getDistanceCore(char *p1, char *l1, char *p2, char *l2); +void checkEllpsUnit(char *unit); +double checkLengthUnit(char *unit); +int checkTimeUnit(char *unit); +double getTimeInterval(char *_t, char *t); +double getSpeed(double length, double ti, double to_meter, int to_sec); +double getDistance(double _x, double _y, double x, double y); +// todo void closeShpFiles(shphandles * shps); +// todo void closeDbfFiles(dbfhandles * dbfs); +void *myMallocRep(size_t size, const char *fileName, int line); + +void checkEllpsUnit(char *unit) +{ +/* + * checks ellipse unit can be used by proj4 + */ + int isOK = 0; + struct PJ_ELLPS *el; /* project.h of proj4 */ + for (el = pj_ellps; el->id; ++el) { + if (!strcmp(el->id, unit)) { + isOK = 1; + } + } + if (!isOK) { + fputs + ("The ellipse argument is not correct or supported by libproj\n", + stderr); + fputs("You can choose the argument from a list below.\n\n", + stderr); + for (el = pj_ellps; el->id; el++) { + printf("%10s\t%s\n", el->id, el->name); + } + exit(ERR_ELLPSUNIT); + } +} + +double checkLengthUnit(char *unit) +{ +/* + * checks length unit can be used by proj4 + * then returns unit value to meter + */ + int isOK = 0; + double to_meter = 0; + struct PJ_UNITS *ut; /* project.h of proj4 */ + for (ut = pj_units; ut->id; ut++) { + if (!strcmp(ut->id, unit)) { + isOK = 1; + to_meter = atof(ut->to_meter); + } + } + if (!isOK) { + fputs + ("The length unit argument is not correct or supported by libproj.\n", + stderr); + fputs("You can choose the argument from a list below.\n\n", + stderr); + for (ut = pj_units; ut->id; ut++) { + printf("%s\t%s\n", ut->id, ut->name); + } + exit(ERR_LENGTHUNIT); + } + return to_meter; +} + +int checkTimeUnit(char *unit) +{ + char *u[8] = { "sec", "s", "min", "m", "hour", "h", "day", "d" }; + int p[8] = { 1, 1, 60, 60, 3600, 3600, 86400, 86400 }; + int i, to_sec = 0; + for (i = 0; i < 8; i++) { + if (!strcmp(u[i], unit)) { + to_sec = p[i]; + } + } + if (!to_sec) { + fputs("The time unit argument is not correct.\n", stderr); + fputs("You can choose the argument from sec, min, hour or day.\n", + stderr); + exit(ERR_TIMEUNIT); + } + return to_sec; +} + +double getTimeInterval(char *_t, char *t) +{ +/* + * Returns a time interval between _t and t. + * The arguments should be "YYYY-MM-DDThh:mm:ssZ" (xml schema + * datetime format without time zone) format. + */ + double ti; + struct tm _tt; + struct tm tt; + time_t _tmt, tmt; + memset(&_tt, 0, sizeof(_tt)); + memset(&tt, 0, sizeof(tt)); + sscanf(_t, "%d-%d-%dT%d:%d:%dZ", &_tt.tm_year, &_tt.tm_mon, + &_tt.tm_mday, &_tt.tm_hour, &_tt.tm_min, &_tt.tm_sec); + _tt.tm_year -= 1900; + _tt.tm_mon -= 1; + sscanf(t, "%d-%d-%dT%d:%d:%d", &tt.tm_year, &tt.tm_mon, &tt.tm_mday, + &tt.tm_hour, &tt.tm_min, &tt.tm_sec); + tt.tm_year -= 1900; + tt.tm_mon -= 1; + _tmt = mktime(&_tt); + tmt = mktime(&tt); + ti = difftime(tmt, _tmt); + return ti; +} + +double getSpeed(double length, double ti, double to_meter, int to_sec) +{ +/* + * Culculates speed from length and time. + */ + double speed; + if (!length || !ti) + speed = 0; + else + speed = (length / to_meter) / (ti / to_sec); + return speed; +} + +double getDistanceCore(char *p1, char *l1, char *p2, char *l2) +{ + /* + * Culculates a geodesic length between two points + * using geod_*.c + */ + phi1 = dmstor(p1, &p1); + lam1 = dmstor(l1, &l1); + phi2 = dmstor(p2, &p2); + lam2 = dmstor(l2, &l2); + geod_inv(); + return geod_S; +} + +double getDistance(double _x, double _y, double x, double y) +{ + /* + * Culculates a geodesic length between two points + */ + double length; + char p1[17], l1[17], p2[17], l2[17]; + sprintf(p1, "%f", _x); + sprintf(l1, "%f", _y); + sprintf(p2, "%f", x); + sprintf(l2, "%f", y); + length = getDistanceCore(p1, l1, p2, l2); + return length; +} + +//todo void closeShpFiles(shphandles * shps) +//{ + /* + * Closes all SHP files if they opened + */ +// if (shps->wpt) +// SHPClose(shps->wpt); +// if (shps->trk) +// SHPClose(shps->trk); +// if (shps->trk_edg) +// SHPClose(shps->trk_edg); +// if (shps->trk_pnt) +// SHPClose(shps->trk_pnt); +// if (shps->rte) +// SHPClose(shps->rte); +// if (shps->rte_edg) +// SHPClose(shps->rte_edg); +// if (shps->rte_pnt) +// SHPClose(shps->rte_pnt); +//} + +//todo void closeDbfFiles(dbfhandles * dbfs) +//{ + /* + * Closes all DBF files if they opened + */ +// if (dbfs->wpt) +// DBFClose(dbfs->wpt); +// if (dbfs->trk) +// DBFClose(dbfs->trk); +// if (dbfs->trk_edg) +// DBFClose(dbfs->trk_edg); +// if (dbfs->trk_pnt) +// DBFClose(dbfs->trk_pnt); +// if (dbfs->rte) +// DBFClose(dbfs->rte); +// if (dbfs->rte_edg) +// DBFClose(dbfs->rte_edg); +// if (dbfs->rte_pnt) +// DBFClose(dbfs->rte_pnt); +//} + -- 2.7.4