[osmctools] 06/17: Imported Upstream version 0.2
Bas Couwenberg
sebastic at xs4all.nl
Sat Oct 25 18:50:09 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch master
in repository osmctools.
commit 0bbb3b0de86458a302613573d8e03e22d7b7610e
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Oct 25 19:48:47 2014 +0200
Imported Upstream version 0.2
---
.gitignore | 7 +++
ChangeLog | 171 -------------------------------------------------------
src/osmconvert.c | 46 ++++++++-------
src/osmfilter.c | 10 ++--
4 files changed, 39 insertions(+), 195 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..925c2dc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*.in
+aclocal.m4
+autom4te.cache/
+configure
+depcomp
+install-sh
+missing
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index ecaf9ed..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,171 +0,0 @@
-2013-06-30 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c modified: osmupdate.c general repository update
-
-2013-02-16 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c Bugfix: "PBF write: uint32 momory overflow" Many thanks to user kukuk!
-
-2012-12-23 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c UTF-8 BOM, bbox merging modified: osmfilter.c minor fixes
-
-2012-12-13 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c new pbf file timestamp modified: osmfilter.c minor bugfixes
-
-2012-11-20 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c bugfix: tolerating unknown pbf header objects
-
-2012-10-14 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c added --all-to-nodes-bbox option
-
-2012-09-22 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c modified: osmupdate.c all: changed --help output to stdout omconvert: now processing AugmentedDiffs osmconvert and osmfilter: increased default for --hash-memory
-
-2012-09-15 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c minor changes modified: osmupdate.c changed planet default URL because of ODbL
-
-2012-07-15 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c added csv-write support modified: osmfilter.c
-
-2012-07-02 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c bugfix: 32 bit overflow in delta longitude thanks to WanMil and Jochen
-
-2012-05-13 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmfilter.c
-
-2012-05-13 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c
-
-2012-05-13 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmupdate.c changed path for daily changefiles to day-replicate; hint: while in redaction period use this option: --planet-url=http://planet.openstreetmap.org/redaction-period/
-
-2012-01-23 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmfilter.c
-
-2012-01-23 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c minor changes
-
-2012-01-08 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c minor changes
-
-2011-12-19 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c minor changes modified: osmfilter.c added numeric comparisons and Boolean terms for filter definitions
-
-2011-11-24 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c modified: osmupdate.c various updates and some fixes new options for osmconvert: --all-to-nodes, --complete-ways, --complex-ways, --parameter-file=
-
-2011-11-06 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c modified: osmupdate.c all files: few minor fixes osmupdate: changed from daily normal downloads to daily replicate downloads, hence normal downloads may miss objects once in a while
-
-2011-10-27 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c minor fixes for Bert modified: osmfilter.c new: wildcards for keys
-
-2011-10-25 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c a few improvements for osmconBert
-
-2011-10-23 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c system language recognition for osmconvert giude, osmfilter can filter objects by id
-
-2011-10-22 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c fix: so-called "empty relations" have been discarded when reading .pbf
-
-2011-10-19 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c modified: osmupdate.c very small interactive guide for osmconvert alternative planet update sources for osmupdate minor fixes for osmfilter
-
-2011-10-16 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmupdate.c added modules for writing of .pbf files
-
-2011-09-30 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmupdate.c bugfix: difficulties if more than one osmconvert option was given
-
-2011-09-18 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c bugfix: option --diff-contents sometimes did not complete
-
-2011-09-14 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmupdate.c fixed: delayed update if --daily option was set
-
-2011-09-11 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c modified: osmfilter.c removed option --in-josm since XML delimiter is now determined automatically
-
-2011-09-08 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c redo previous changes (sorry)
-
-2011-09-08 Markus Weber <marqqs at gmx.eu>
-
- * modified: osmconvert.c Allowing 64 bit relation IDs since needed by FOSM. Thanks to Roy!
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Fix AUTHORS
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Add development instructions
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Ignore autotools-generated files
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Minor fixes
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Generate config header
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Warn if zlib is missing
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Sources autotoolified
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Move sources under src/
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Add ancillary files
-
-2011-09-06 David Paleino <d.paleino at gmail.com>
-
- * Add copyright year
-
-2011-09-05 Markus Weber <marqqs at gmx.eu>
-
- * new file: osmfilter.c new file: osmupdate.c
-
-2011-09-05 Markus Weber <marqqs at gmx.eu>
-
- * Initial commit
diff --git a/src/osmconvert.c b/src/osmconvert.c
index 2d51a67..a4e79d9 100644
--- a/src/osmconvert.c
+++ b/src/osmconvert.c
@@ -1,10 +1,10 @@
-// osmconvert 2013-06-30 10:30
-#define VERSION "0.7T"
+// osmconvert 2014-06-19 13:40
+#define VERSION "0.7W"
//
// compile this file:
// gcc osmconvert.c -lz -O3 -o osmconvert
//
-// (c) 2011..2013 Markus Weber, Nuernberg
+// (c) 2011..2014 Markus Weber, Nuernberg
// Richard Russo contributed the initiative to --add-bbox-tags option
//
// This program is free software; you can redistribute it and/or
@@ -3449,8 +3449,13 @@ return 0;
pb_hisver= 0;
else if((hiscomplete&24)!=24) // no user information
pb_hisuid= 0;
+ #if 1 // 2014-06-16
+ if((complete & 1)==1) { // minimum contents available
+ // (at least id)
+ #else
if((complete & 17)==17) { // minimum contents available
// (at least id and node refs)
+ #endif
waycomplete= true;
goto mainloop;
}
@@ -3716,7 +3721,7 @@ return 0;
l= pbf_uint32(&bp);
bp+= l; // (ignore this element)
break;
- case 0x80: // 0x02 V 32, osmosis_replication_timestamp ,,,
+ case 0x80: // 0x02 V 32, osmosis_replication_timestamp
if(bp[1]!=0x02) goto h_unknown;
bp+= 2;
pb_filetimestamp= pbf_uint64(&bp);
@@ -5126,7 +5131,7 @@ static void pw_header(bool bboxvalid,
pw__obj_add_id2(0x8a01); // S 17 'source'
pw__obj_add_str("http://www.openstreetmap.org/api/0.6");
if(timestamp!=0) { // file timestamp given
- pw__obj_add_id2(0x8002); // V 32 osmosis_replication_timestamp ,,,
+ pw__obj_add_id2(0x8002); // V 32 osmosis_replication_timestamp
pw__obj_add_uint64(timestamp);
} // file timestamp given
/* write 'raw_size' into hierarchy object's header */ {
@@ -6933,7 +6938,7 @@ static void str_read(byte** pp,char** s1p,char** s2p) {
char* p;
int len1,len2;
int ref;
- bool donotstore; // string has 'do not store flag' 2012-10-01 ,,,
+ bool donotstore; // string has 'do not store flag' 2012-10-01
p= (char*)*pp;
if(*p==0) { // string (pair) given directly
@@ -7842,7 +7847,7 @@ static inline void wo_addbboxtags(bool fornode,
else
wo_wayrel_keyval("bBoxArea",s);
} // add bbox area tags
- if(global_addbboxweight) { // add bbox weight tags ,,,,,
+ if(global_addbboxweight) { // add bbox weight tags
write_createsint64(msbit(area),s);
if(fornode)
wo_node_keyval("bBoxWeight",s);
@@ -8372,7 +8377,7 @@ static void oo__findbb() {
// oo__bbvalid: following border box information is valid;
// oo__bbx1 .. oo__bby2: border box coordinates;
// read_bufp will not be changed;
- byte* bufp,*bufe;
+ byte* bufp,*bufe,*bufe1;
int32_t bbx1= 0,bby1= 0,bbx2= 0,bby2= 0;
// bbox coordinates (base 10^-7)
@@ -8395,23 +8400,23 @@ return;
if(b==0xdc) { // timestamp
bufp++;
l= pbf_uint32(&bufp);
- bufe= bufp+l;
- if(bufp<bufe) oo__timestamp= pbf_sint64(&bufp);
- bufp= bufe;
+ bufe1= bufp+l; if(bufe1>=bufe) bufe1= bufe;
+ if(bufp<bufe1) oo__timestamp= pbf_sint64(&bufp);
+ bufp= bufe1;
continue;
} // timestamp
if(b==0xdb) { // border box
bufp++;
l= pbf_uint32(&bufp);
- bufe= bufp+l;
- if(bufp<bufe) bbx1= pbf_sint32(&bufp);
- if(bufp<bufe) bby1= pbf_sint32(&bufp);
- if(bufp<bufe) bbx2= pbf_sint32(&bufp);
- if(bufp<bufe) {
+ bufe1= bufp+l; if(bufe1>=bufe) bufe1= bufe;
+ if(bufp<bufe1) bbx1= pbf_sint32(&bufp);
+ if(bufp<bufe1) bby1= pbf_sint32(&bufp);
+ if(bufp<bufe1) bbx2= pbf_sint32(&bufp);
+ if(bufp<bufe1) {
bby2= pbf_sint32(&bufp);
oo__mergebbox(bbx1,bby1,bbx2,bby2);
}
- bufp= bufe;
+ bufp= bufe1;
continue;
} // border box
bufp++;
@@ -10456,7 +10461,7 @@ return 26;
refidp++;
} // end for every referenced node
if(global_add)
- wo_addbboxtags(false,x_min,y_min,x_max,y_max); //,,,,,
+ wo_addbboxtags(false,x_min,y_min,x_max,y_max);
keyp= key; valp= val;
while(keyp<keye) // for all key/val pairs of this object
wo_wayrel_keyval(*keyp++,*valp++);
@@ -10632,7 +10637,7 @@ return 26;
}
refidp++; reftypep++; refrolep++;
} // end for every referenced object
- if(global_add) { //,,,,,
+ if(global_add) {
posi_get(id+global_otypeoffset20); // get coordinates
if(posi_xy!=NULL && posi_xy[0]!=posi_nil)
// stored coordinates are valid
@@ -11817,7 +11822,8 @@ return 0; // end the program, because without having input files
// try to determine the output format by evaluating
// the file name extension
if(strycmp(outputfilename,".o5m")==0) global_outo5m= true;
- else if(strycmp(outputfilename,".o5c")==0) global_outo5c= true;
+ else if(strycmp(outputfilename,".o5c")==0)
+ global_outo5m= global_outo5c= true;
else if(strycmp(outputfilename,".osm")==0) global_outosm= true;
else if(strycmp(outputfilename,".osc")==0) global_outosc= true;
else if(strycmp(outputfilename,".osh")==0) global_outosh= true;
diff --git a/src/osmfilter.c b/src/osmfilter.c
index aca4a0d..c5d0da5 100644
--- a/src/osmfilter.c
+++ b/src/osmfilter.c
@@ -1,10 +1,11 @@
-// osmfilter 2012-12-30 14:20
-#define VERSION "1.2S+"
-// (c) 2011, 2012 Markus Weber, Nuernberg
+// osmfilter 2014-06-22 14:00
+#define VERSION "1.2T"
//
// compile this file:
// gcc osmfilter.c -O3 -o osmfilter
//
+// (c) 2011..2014 Markus Weber, Nuernberg
+//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Affero General Public License
// version 3 as published by the Free Software Foundation.
@@ -6193,7 +6194,8 @@ return 2;
// try to determine the output format by evaluating
// the file name extension
if(strycmp(outputfilename,".o5m")==0) global_outo5m= true;
- else if(strycmp(outputfilename,".o5c")==0) global_outo5c= true;
+ else if(strycmp(outputfilename,".o5c")==0)
+ global_outo5m= global_outo5c= true;
else if(strycmp(outputfilename,".osm")==0) global_outosm= true;
else if(strycmp(outputfilename,".osc")==0) global_outosc= true;
else if(strycmp(outputfilename,".osh")==0) global_outosh= true;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmctools.git
More information about the Pkg-grass-devel
mailing list