gnonthgol / sosi2osm Goto Github PK
View Code? Open in Web Editor NEWA program to translate sosi files to osm files
License: GNU General Public License v3.0
A program to translate sosi files to osm files
License: GNU General Public License v3.0
Hi,
I am getting an error Not a sosi file:
Is there anything wrong with the comand i am running?
The SOSI file i am using can be downloaded here: http://data.kartverket.no/download/content/n500-kartdata-utm-33-hele-landet
sosi2osm NO_N500_Arealdekke.sos /projeckt/sosi2osm/lua/arealdekke.lua
Not a SOSI file: NO_N500_Arealdekke.sos
All help appreciated!
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 ;)
Hi. What is the currently best MIME type to use for SOSI files? I could not find anything relevant over at https://iana.org/assignments/media-types/media-types.xhtml .
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.
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);
^~~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.