Giter VIP home page Giter VIP logo

sosi2osm's People

Contributors

bobkare avatar comradekingu avatar gnonthgol avatar rubund avatar sebastic avatar tibnor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sosi2osm's Issues

Escaping of some pesky characters

Hi,
I am trying to convert the friluftsruter (outdoor maps) with sosi2osm using the defaul.lua (i guess there is no specific script for that yet?). I am using the debian 8/jessie version on ubuntu 12.04 for that and noticed that it does not work for two reasons. However, fixing them manually creates an .osm file that josm loads just fine.

The problems are the use of < and > in some values, for example:

<tag k="INFORMASJON" v="Geometri hentet fra TraktorvegSti, <ord2>"/>

and the use of ampersand (&):

<tag k="OPPHAV" v="Kvarven U&IL"/>

These strings are just copied over from the original SOSI files AFAICT. I have not checked how these should actually be encoded in the OSM XML, or if this was fixed already upstream, sorry for any inconvenience ;)

Support for PROJ 6.0.0

sosi2osm still uses proj_api.h which is deprecated in PROJ 6.0.0 and will be removed in PROJ 7.0.0 (scheduled for March 2020).

When using proj_api.h with PROJ 6.0.0 -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H needs to be added to CFLAGS to prevent a compiler error.

sosi2osm should be updated to (also) support the proj.h API.

GCC 8 compilation issue

There is a compilation issue with gcc 8.

Its's similar to kartverket/fyba#21 macro "min" passed 3 arguments, but takes just 2

g++ -march=native -mtune=native -O3 -pipe -fstack-protector-strong -fno-plt -I/usr/include/fyba `pkg-config --cflags lua fyba` -DLINUX -DUNIX -g  -c -o node.o node.cpp
In file included from /usr/include/c++/8.2.1/algorithm:61,
                 from node.cpp:3:
/usr/include/c++/8.2.1/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^
/usr/include/c++/8.2.1/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^
In file included from /usr/include/c++/8.2.1/bits/stl_algo.h:60,
                 from /usr/include/c++/8.2.1/algorithm:62,
                 from node.cpp:3:
/usr/include/c++/8.2.1/bits/algorithmfwd.h:375:41: error: macro "max" passed 3 arguments, but takes just 2
     max(const _Tp&, const _Tp&, _Compare);
                                         ^
/usr/include/c++/8.2.1/bits/algorithmfwd.h:388:41: error: macro "min" passed 3 arguments, but takes just 2
     min(const _Tp&, const _Tp&, _Compare);
                                         ^
/usr/include/c++/8.2.1/bits/algorithmfwd.h:416:30: error: macro "min" requires 2 arguments, but only 1 given
     min(initializer_list<_Tp>);
                              ^
/usr/include/c++/8.2.1/bits/algorithmfwd.h:426:30: error: macro "max" requires 2 arguments, but only 1 given
     max(initializer_list<_Tp>);
                              ^
In file included from /usr/include/c++/8.2.1/bits/uniform_int_dist.h:35,
                 from /usr/include/c++/8.2.1/bits/stl_algo.h:66,
                 from /usr/include/c++/8.2.1/algorithm:62,
                 from node.cpp:3:
/usr/include/c++/8.2.1/limits:317:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
           ^
/usr/include/c++/8.2.1/limits:321:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
           ^
/usr/include/c++/8.2.1/limits:388:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return false; }
           ^
/usr/include/c++/8.2.1/limits:391:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return true; }
           ^
/usr/include/c++/8.2.1/limits:395:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:457:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); }
           ^
/usr/include/c++/8.2.1/limits:460:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
           ^
/usr/include/c++/8.2.1/limits:464:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:524:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; }
           ^
/usr/include/c++/8.2.1/limits:527:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
           ^
/usr/include/c++/8.2.1/limits:531:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:594:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/8.2.1/limits:597:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
           ^
/usr/include/c++/8.2.1/limits:601:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:667:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); }
           ^
/usr/include/c++/8.2.1/limits:670:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
           ^
/usr/include/c++/8.2.1/limits:674:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:736:11: error: macro "min" requires 2 arguments, but only 1 given
       min() noexcept { return __glibcxx_min (char16_t); }
           ^
/usr/include/c++/8.2.1/limits:739:11: error: macro "max" requires 2 arguments, but only 1 given
       max() noexcept { return __glibcxx_max (char16_t); }
           ^
/usr/include/c++/8.2.1/limits:742:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:797:11: error: macro "min" requires 2 arguments, but only 1 given
       min() noexcept { return __glibcxx_min (char32_t); }
           ^
/usr/include/c++/8.2.1/limits:800:11: error: macro "max" requires 2 arguments, but only 1 given
       max() noexcept { return __glibcxx_max (char32_t); }
           ^
/usr/include/c++/8.2.1/limits:803:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:859:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; }
           ^
/usr/include/c++/8.2.1/limits:862:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
           ^
/usr/include/c++/8.2.1/limits:866:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:926:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/8.2.1/limits:929:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
           ^
/usr/include/c++/8.2.1/limits:933:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:999:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; }
           ^
/usr/include/c++/8.2.1/limits:1002:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
           ^
/usr/include/c++/8.2.1/limits:1006:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:1066:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/8.2.1/limits:1069:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
           ^
/usr/include/c++/8.2.1/limits:1073:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:1138:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; }
           ^
/usr/include/c++/8.2.1/limits:1141:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
           ^
/usr/include/c++/8.2.1/limits:1145:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:1205:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/8.2.1/limits:1208:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
           ^
/usr/include/c++/8.2.1/limits:1212:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:1278:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
           ^
/usr/include/c++/8.2.1/limits:1281:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
           ^
/usr/include/c++/8.2.1/limits:1285:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:1348:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/8.2.1/limits:1351:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
           ^
/usr/include/c++/8.2.1/limits:1355:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/8.2.1/limits:1571:85: error: macro "min" requires 2 arguments, but only 1 given
    __INT_N_201103 (__GLIBCXX_TYPE_INT_N_0), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_0))
                                                                                     ^
/usr/include/c++/8.2.1/limits:1571:85: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/8.2.1/limits:1571:85: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/8.2.1/limits:1571:85: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/8.2.1/limits:1571:85: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/8.2.1/limits:1571:85: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/8.2.1/limits:1599:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
           ^
/usr/include/c++/8.2.1/limits:1602:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
           ^
/usr/include/c++/8.2.1/limits:1674:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; }
           ^
/usr/include/c++/8.2.1/limits:1677:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
           ^
/usr/include/c++/8.2.1/limits:1749:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; }
           ^
/usr/include/c++/8.2.1/limits:1752:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
           ^
In file included from /usr/include/c++/8.2.1/bits/stl_algo.h:66,
                 from /usr/include/c++/8.2.1/algorithm:62,
                 from node.cpp:3:
/usr/include/c++/8.2.1/bits/uniform_int_dist.h:73:56: error: macro "max" requires 2 arguments, but only 1 given
      _IntType __b = std::numeric_limits<_IntType>::max())
                                                        ^
/usr/include/c++/8.2.1/bits/uniform_int_dist.h:106:57: error: macro "max" requires 2 arguments, but only 1 given
       _IntType __b = std::numeric_limits<_IntType>::max())
                                                         ^
/usr/include/c++/8.2.1/bits/uniform_int_dist.h:150:11: error: macro "min" requires 2 arguments, but only 1 given
       min() const
           ^
/usr/include/c++/8.2.1/bits/uniform_int_dist.h:157:11: error: macro "max" requires 2 arguments, but only 1 given
       max() const
           ^
/usr/include/c++/8.2.1/bits/uniform_int_dist.h:228:40: error: macro "min" requires 2 arguments, but only 1 given
  const __uctype __urngmin = __urng.min();
                                        ^
/usr/include/c++/8.2.1/bits/uniform_int_dist.h:229:40: error: macro "max" requires 2 arguments, but only 1 given
  const __uctype __urngmax = __urng.max();
                                        ^
/usr/include/c++/8.2.1/bits/uniform_int_dist.h:297:40: error: macro "min" requires 2 arguments, but only 1 given
  const __uctype __urngmin = __urng.min();
                                        ^
/usr/include/c++/8.2.1/bits/uniform_int_dist.h:298:40: error: macro "max" requires 2 arguments, but only 1 given
  const __uctype __urngmax = __urng.max();
                                        ^
In file included from /usr/include/c++/8.2.1/algorithm:62,
                 from node.cpp:3:
/usr/include/c++/8.2.1/bits/stl_algo.h:3450:34: error: macro "min" requires 2 arguments, but only 1 given
     min(initializer_list<_Tp> __l)
                                  ^
/usr/include/c++/8.2.1/bits/stl_algo.h:3462:34: error: macro "max" requires 2 arguments, but only 1 given
     max(initializer_list<_Tp> __l)
                                  ^
/usr/include/c++/8.2.1/bits/stl_algo.h:3815:45: error: macro "max" requires 2 arguments, but only 1 given
       const __uc_type __urngrange = __g.max() - __g.min();
                                             ^
/usr/include/c++/8.2.1/bits/stl_algo.h:3815:57: error: macro "min" requires 2 arguments, but only 1 given
       const __uc_type __urngrange = __g.max() - __g.min();
                                                         ^
/usr/include/c++/8.2.1/bits/stl_algo.h:5764:45: error: macro "max" requires 2 arguments, but only 1 given
       const __uc_type __urngrange = __g.max() - __g.min();
                                             ^
/usr/include/c++/8.2.1/bits/stl_algo.h:5764:57: error: macro "min" requires 2 arguments, but only 1 given
       const __uc_type __urngrange = __g.max() - __g.min();
[.....]
make: *** [<builtin>: node.o] Error 1

After changing the intro of node.cpp into

#include <algorithm>
#include <proj_api.h>
#include "sosi2osm.h"

I'm still getting an error:

In file included from /usr/include/fyba/fyba.h:89,
                 from sosi2osm.h:1,
                 from node.cpp:4:
node.cpp: In function 'long int createNode(double, double, short int, FILE*)':
/usr/include/fyba/fyut.h:128:18: error: expected unqualified-id before '(' token
 #define max(a,b) (((a) > (b)) ? (a) : (b))
                  ^
node.cpp:55:19: note: in expansion of macro 'max'
      sizeM = std::max(1024, sizeM*2);
                   ^~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.