Skip to content
Commits on Source (5)
mkgmap (0.0.0+svn4323-1) unstable; urgency=medium
* New upstream SVN snapshot.
* Update copyright file.
-- Bas Couwenberg <sebastic@debian.org> Fri, 01 Nov 2019 20:56:12 +0100
mkgmap (0.0.0+svn4294-1) unstable; urgency=medium
* New upstream SVN snapshot.
......
......@@ -48,7 +48,6 @@ Files: src/uk/me/parabola/mkgmap/combiners/GmapiBuilder.java
src/uk/me/parabola/mkgmap/reader/osm/ResidentialHook.java
src/uk/me/parabola/util/KdTree.java
src/uk/me/parabola/util/Locatable.java
src/uk/me/parabola/util/MultiHashSet.java
src/uk/me/parabola/util/ShapeSplitter.java
test/main/RulesTest.java
test/uk/me/parabola/imgfmt/app/dem/DemTileTest.java
......
......@@ -268,6 +268,9 @@ the addr:street tag value of the house number node.
<p>
If the street is not given with addr:housenumber, mkgmap uses heuristics
to find the best match.
<p>
Tells mkgmap to write NET data. If you specify this option, you do not need to
specify --net and option -no-net is ignored.
=== Overview map options ===
;--overview-mapname=name
......@@ -523,13 +526,13 @@ will ask you to try a value for this option.
<p>
;--net
: Tells mkgmap to write NET data, which is needed for address search
and routing. Use this option if you want full address search, but do
not need a map that supports routing.
and routing. Use this option if you want address search, but do
not need a map that supports routing or house number search.
<p>
;--route
: Tells mkgmap to write NET and NOD data, which are needed in maps
that support routing. If you specify this option, you do not need
to specify --net.
to specify --net and --no-net is ignored.
<p>
;--add-boundary-nodes-at-admin-boundaries=NUM
: This option controls how mkgmap calculates special routing nodes which
......
......@@ -261,6 +261,8 @@ Address search options:
the addr:street tag value of the house number node.
If the street is not given with addr:housenumber, mkgmap uses heuristics
to find the best match.
Tells mkgmap to write NET data. If you specify this option, you do not need
to specify --net and option -no-net is ignored.
Overview map options:
--overview-mapname=name
......@@ -516,13 +518,13 @@ Miscellaneous options:
--net
Tells mkgmap to write NET data, which is needed for address search
and routing. Use this option if you want full address search, but do
not need a map that supports routing.
and routing. Use this option if you want address search, but do
not need a map that supports routing or house number search.
--route
Tells mkgmap to write NET and NOD data, which are needed in maps
that support routing. If you specify this option, you do not need
to specify --net.
to specify --net and option -no-net is ignored.
--drive-on=left|right|detect|detect,left|detect,right
Explicitly specify which side of the road vehicles are
......
svn.version: 4294
build.timestamp: 2019-09-28T07:25:58+0100
svn.version: 4323
build.timestamp: 2019-10-26T09:00:42+0100
......@@ -17,7 +17,6 @@
package uk.me.parabola.imgfmt.app.lbl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import uk.me.parabola.imgfmt.app.ImgFileWriter;
......@@ -65,7 +64,7 @@ public class Highway {
if(extraData) {
writer.put1u(0);
writer.put2u(region == null? 0 : region.getIndex());
Collections.sort(exits);
exits.sort(null);
for(ExitPoint ep : exits) {
writer.put1u(ep.index);
writer.put2u(ep.div.getNumber());
......
......@@ -35,7 +35,7 @@ public class POIIndex {
this.name = name;
this.poiIndex = poiIndex;
this.group = group;
this.subType = subType;
this.subType = subType & 0xff;
}
void write(ImgFileWriter writer) {
......
......@@ -17,7 +17,6 @@
package uk.me.parabola.imgfmt.app.lbl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
......@@ -98,7 +97,7 @@ public class PlacesFile {
SortKey<POIIndex> sortKey = sort.createSortKey(index, index.getName());
sorted.add(sortKey);
}
Collections.sort(sorted);
sorted.sort(null);
for (SortKey<POIIndex> key : sorted) {
key.getObject().write(writer);
......@@ -342,7 +341,7 @@ public class PlacesFile {
SortKey<Country> key = sort.createSortKey(c, c.getLabel());
keys.add(key);
}
Collections.sort(keys);
keys.sort(null);
countryList.clear();
int index = 1;
......@@ -362,7 +361,7 @@ public class PlacesFile {
SortKey<Region> key = sort.createSortKey(r, r.getLabel(), r.getCountry().getIndex());
keys.add(key);
}
Collections.sort(keys);
keys.sort(null);
regionList.clear();
int index = 1;
......@@ -383,7 +382,7 @@ public class PlacesFile {
sortKey = new CombinedSortKey<>(sortKey, c.getRegionNumber(), c.getCountryNumber());
keys.add(sortKey);
}
Collections.sort(keys);
keys.sort(null);
cityList.clear();
int index = 1;
......@@ -400,7 +399,7 @@ public class PlacesFile {
SortKey<Zip> sortKey = sort.createSortKey(c, c.getLabel());
keys.add(sortKey);
}
Collections.sort(keys);
keys.sort(null);
zipList.clear();
int index = 1;
......
......@@ -121,11 +121,11 @@ public class Map implements InternalFiles, Configurable {
// we don't want routing info in the overview map (for now)
if (!OverviewBuilder.isOverviewImg(mapName)){
try {
if (props.containsKey("route")) {
if (props.containsKey("route") || props.containsKey("net") || props.containsKey("housenumbers")) {
addNet();
}
if (props.containsKey("route")) {
addNod();
} else if (props.containsKey("net")) {
addNet();
}
} catch (FileExistsException e) {
log.warn("Could not add NET and/or NOD sections");
......
......@@ -13,7 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -66,7 +65,7 @@ public abstract class LargeListSorter<T extends NamedRecord> {
keys.add(makeKey(list.get(i), sort, cache));
}
cache = null;
Collections.sort(keys);
keys.sort(null);
for (int i = 0; i < keys.size(); i++){
SortKey<T> sk = keys.get(i);
......
......@@ -13,7 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
......@@ -70,7 +69,7 @@ public class Mdr10 extends MdrMapSection {
if (poiGroup == null)
continue;
Collections.sort(poiGroup);
poiGroup.sort(null);
String lastName = null;
int lastSub = -1;
......
......@@ -13,7 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import uk.me.parabola.imgfmt.app.ImgFileWriter;
......@@ -35,7 +34,7 @@ public class Mdr13 extends MdrSection implements HasHeaderFlags {
}
public void writeSectData(ImgFileWriter writer) {
Collections.sort(regions);
regions.sort(null);
for (Mdr13Record region : regions) {
putMapIndex(writer, region.getMapIndex());
......
......@@ -13,7 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import uk.me.parabola.imgfmt.app.ImgFileWriter;
......@@ -31,7 +30,7 @@ public class Mdr14 extends MdrSection implements HasHeaderFlags {
}
public void writeSectData(ImgFileWriter writer) {
Collections.sort(countries);
countries.sort(null);
for (Mdr14Record country : countries) {
putMapIndex(writer, country.getMapIndex());
......
......@@ -13,8 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import uk.me.parabola.imgfmt.app.ImgFileWriter;
......@@ -26,7 +24,7 @@ import uk.me.parabola.imgfmt.app.ImgFileWriter;
*/
public class Mdr19 extends MdrSection implements HasHeaderFlags {
private List<Mdr11Record> pois;
private final List<Mdr18Record> poiTypes = new ArrayList<Mdr18Record>();
private final List<Mdr18Record> poiTypes = new ArrayList<>();
public Mdr19(MdrConfig config) {
setConfig(config);
......@@ -35,19 +33,12 @@ public class Mdr19 extends MdrSection implements HasHeaderFlags {
/**
* Sort the pois by type.
*/
@Override
public void preWriteImpl() {
Collections.sort(pois, new Comparator<Mdr11Record>() {
public int compare(Mdr11Record o1, Mdr11Record o2) {
// For mainly historical reasons, we keep the element type in a number of different
// formats. Need to normalise it before sorting.
int t1 = MdrUtils.fullTypeToNaturalType(o1.getType());
int t2 = MdrUtils.fullTypeToNaturalType(o2.getType());
if (t1 == t2) return 0;
else if (t1 < t2) return -1;
else return 1;
}
});
// For mainly historical reasons, we keep the element type in a number
// of different formats. Need to normalise it before sorting.
pois.sort((o1, o2) -> Integer.compare(MdrUtils.fullTypeToNaturalType(o1.getType()),
MdrUtils.fullTypeToNaturalType(o2.getType())));
}
/**
......@@ -92,6 +83,7 @@ public class Mdr19 extends MdrSection implements HasHeaderFlags {
* Release the copy of the pois. The other index is small and not worth
* worrying about.
*/
@Override
protected void releaseMemory() {
pois = null;
}
......
......@@ -15,8 +15,6 @@ package uk.me.parabola.imgfmt.app.mdr;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
......@@ -50,13 +48,11 @@ public class Mdr20 extends Mdr2x {
*/
public void buildFromStreets(List<Mdr7Record> inStreets) {
ArrayList<Mdr7Record> sorted = new ArrayList<>(inStreets);
Collections.sort(sorted, new Comparator<Mdr7Record>() {
public int compare(Mdr7Record o1, Mdr7Record o2) {
sorted.sort((o1, o2) -> {
int d = Integer.compare(o1.getCity().getMdr20SortPos(), o2.getCity().getMdr20SortPos());
if (d != 0)
return d;
return Integer.compare(o1.getIndex(), o2.getIndex());
}
});
Collator collator = getConfig().getSort().getCollator();
......@@ -96,9 +92,7 @@ public class Mdr20 extends Mdr2x {
* Two streets are in the same group if they have the same mdr20 id.
*/
protected boolean sameGroup(Mdr7Record street1, Mdr7Record street2) {
if (street2 != null && street1.getCity().getMdr20() == street2.getCity().getMdr20())
return true;
return false;
return street2 != null && street1.getCity().getMdr20() == street2.getCity().getMdr20();
}
/**
......
......@@ -13,8 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
......@@ -42,16 +40,13 @@ public class Mdr21 extends Mdr2x {
if (street.getCity() != null && street.getCity().getMdrRegion() != null)
sorted.add(street);
}
Collections.sort(sorted, new Comparator<Mdr7Record>() {
public int compare(Mdr7Record o1, Mdr7Record o2) {
sorted.sort((o1, o2) -> {
int d = Integer.compare(o1.getCity().getMdr21SortPos(), o2.getCity().getMdr21SortPos());
if (d != 0)
return d;
return Integer.compare(o1.getIndex(), o2.getIndex());
}
});
int lastIndex = -1;
int record = 0;
for (Mdr7Record street : sorted) {
......
......@@ -15,7 +15,6 @@ package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
......@@ -50,16 +49,13 @@ public class Mdr22 extends Mdr2x {
sorted.add(street);
}
}
Collections.sort(sorted, new Comparator<Mdr7Record>() {
public int compare(Mdr7Record o1, Mdr7Record o2) {
sorted.sort((o1, o2) -> {
int d = Integer.compare(o1.getCity().getMdr22SortPos(), o2.getCity().getMdr22SortPos());
if (d != 0)
return d;
return Integer.compare(o1.getIndex(), o2.getIndex());
}
});
int lastIndex = -1;
int record = 0;
for (Mdr7Record street : sorted) {
......@@ -77,7 +73,6 @@ public class Mdr22 extends Mdr2x {
lastIndex = street.getIndex();
}
}
return;
}
protected boolean sameGroup(Mdr7Record street1, Mdr7Record street2) {
......
......@@ -13,7 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import uk.me.parabola.imgfmt.app.ImgFileWriter;
......@@ -26,7 +25,7 @@ import uk.me.parabola.imgfmt.app.srt.SortKey;
* @author Steve Ratcliffe
*/
public class Mdr23 extends MdrSection {
private final List<Mdr13Record> regions = new ArrayList<Mdr13Record>();
private final List<Mdr13Record> regions = new ArrayList<>();
public Mdr23(MdrConfig config) {
setConfig(config);
......@@ -39,7 +38,6 @@ public class Mdr23 extends MdrSection {
public void sortRegions(List<Mdr13Record> list) {
Sort sort = getConfig().getSort();
List<SortKey<Mdr13Record>> keys = MdrUtils.sortList(sort, list);
Collections.sort(keys);
String lastName = null;
int lastMapIndex = 0;
......
......@@ -13,7 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import uk.me.parabola.imgfmt.app.ImgFileWriter;
......@@ -26,7 +25,7 @@ import uk.me.parabola.imgfmt.app.srt.SortKey;
* @author Steve Ratcliffe
*/
public class Mdr24 extends MdrSection {
private final List<Mdr14Record> countries = new ArrayList<Mdr14Record>();
private final List<Mdr14Record> countries = new ArrayList<>();
public Mdr24(MdrConfig config) {
setConfig(config);
......@@ -40,8 +39,6 @@ public class Mdr24 extends MdrSection {
Sort sort = getConfig().getSort();
List<SortKey<Mdr14Record>> keys = MdrUtils.sortList(sort, list);
Collections.sort(keys);
String lastName = null;
int lastMapIndex = 0;
int record = 0;
......
......@@ -13,7 +13,6 @@
package uk.me.parabola.imgfmt.app.mdr;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import uk.me.parabola.imgfmt.app.ImgFileWriter;
......@@ -45,7 +44,7 @@ public class Mdr25 extends MdrSection {
keys.add(key);
}
Collections.sort(keys);
keys.sort(null);
String lastName = null;
Mdr5Record lastCity = null;
......