BUGFIX 39
git-svn-id: https://osmand.googlecode.com/svn/trunk@464 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
64487887c3
commit
73449e4ea6
2 changed files with 32 additions and 17 deletions
|
@ -36,7 +36,19 @@ public class IndexBatchCreator {
|
||||||
protected static final Log log = LogUtil.getLog(IndexBatchCreator.class);
|
protected static final Log log = LogUtil.getLog(IndexBatchCreator.class);
|
||||||
protected static final String SITE_TO_DOWNLOAD1 = "http://download.geofabrik.de/osm/europe/"; //$NON-NLS-1$
|
protected static final String SITE_TO_DOWNLOAD1 = "http://download.geofabrik.de/osm/europe/"; //$NON-NLS-1$
|
||||||
|
|
||||||
// TODO send address index for big : (!) GB
|
// google code couldn't accept files more than 100MB so we can skip some countries
|
||||||
|
private static final Set<String> doNotWriteWayNodesInUploading = new LinkedHashSet<String>();
|
||||||
|
static {
|
||||||
|
doNotWriteWayNodesInUploading.addAll(Arrays.asList(new String[]{
|
||||||
|
"great_britain",
|
||||||
|
// US
|
||||||
|
"us_alabama", "us_california", "us_florida", "us_georgia", "us_illinois", "us_indiana",
|
||||||
|
"us_kentucky", "us_maryland", "us_massachusetts", "us_missouri", "us_new_york",
|
||||||
|
}));
|
||||||
|
// next could be : australia
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected static final String[] europeCountries = new String[] {
|
protected static final String[] europeCountries = new String[] {
|
||||||
// "albania", "andorra", "austria", // 5.3, 0.4, 100 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
// "albania", "andorra", "austria", // 5.3, 0.4, 100 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
// "belarus", "belgium", "bosnia-herzegovina", // 39, 43, 4.1 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
// "belarus", "belgium", "bosnia-herzegovina", // 39, 43, 4.1 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
|
@ -54,7 +66,7 @@ public class IndexBatchCreator {
|
||||||
// "ukraine", // 19 //$NON-NLS-1$
|
// "ukraine", // 19 //$NON-NLS-1$
|
||||||
//TOTAL : 1129 MB
|
//TOTAL : 1129 MB
|
||||||
// "czech_republic", "netherlands", // 168, 375,
|
// "czech_republic", "netherlands", // 168, 375,
|
||||||
// "great_britain" (!), "italy", // 310, 246,
|
// "great_britain" , "italy", // 310, 246,
|
||||||
// ADD TO TOTAL : 2449 MB
|
// ADD TO TOTAL : 2449 MB
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -73,22 +85,19 @@ public class IndexBatchCreator {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Great-britain !
|
|
||||||
|
|
||||||
protected static final String SITE_TO_DOWNLOAD2 = "http://downloads.cloudmade.com/"; //$NON-NLS-1$
|
protected static final String SITE_TO_DOWNLOAD2 = "http://downloads.cloudmade.com/"; //$NON-NLS-1$
|
||||||
// us states
|
// us states
|
||||||
// TODO Address (out of memory) : west-virginia, virginia, vermont, utas, texas, tennesse, pensilvania, oregon,..
|
// TODO Address (out of memory) : west-virginia, virginia, vermont, utas, texas, tennesse, pensilvania, oregon,..
|
||||||
// "Alabama", "California", "Florida", "Georgia", "Illinois", "Indiana", "Kentucky", "Maryland", "Massachusetts",
|
|
||||||
// "Missouri", "New_York",
|
|
||||||
protected static final String[] usStates = new String[] {
|
protected static final String[] usStates = new String[] {
|
||||||
// "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut",
|
// "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut",
|
||||||
// "Delaware", "District_of_Columbia", "Florida", "Georgia", "Guantanamo_Bay", "Hawaii",
|
// "Delaware", "District_of_Columbia", "Florida", "Georgia", "Guantanamo_Bay", "Hawaii",
|
||||||
// "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine",
|
// "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine",
|
||||||
// "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri",
|
// "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri",
|
||||||
// "Montana", "Nebraska", "Nevada", "New_Hampshire", "New_Jersey", "New_Mexico",
|
// "Montana", "Nebraska", "Nevada", "New_Hampshire", "New_Jersey", "New_Mexico",
|
||||||
"New_York", "North_Carolina", "North_Dakota", "Ohio", "Oklahoma", "Oregon",
|
// TODO
|
||||||
"Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee",
|
// "New_York", "North_Carolina", "North_Dakota", "Ohio", "Oklahoma", "Oregon",
|
||||||
"Texas", "Utah", "Vermont", "Virginia", "Washington", "West_Virginia", "Wisconsin", "Wyoming",
|
// "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee",
|
||||||
|
// "Texas", "Utah", "Vermont", "Virginia", "Washington", "West_Virginia", "Wisconsin", "Wyoming",
|
||||||
};
|
};
|
||||||
|
|
||||||
protected static final String[] canadaStates = new String[] {
|
protected static final String[] canadaStates = new String[] {
|
||||||
|
@ -349,19 +358,22 @@ public class IndexBatchCreator {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
String regionName = f.getName();
|
||||||
|
int i = f.getName().indexOf('.');
|
||||||
|
if (i > -1) {
|
||||||
|
regionName = Algoritms.capitalizeFirstLetterAndLowercase(f.getName().substring(0, i));
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean saveAddressWays = writeWayNodes && !doNotWriteWayNodesInUploading.contains(regionName.toLowerCase());
|
||||||
IndexCreator indexCreator = new IndexCreator(indexDirFiles);
|
IndexCreator indexCreator = new IndexCreator(indexDirFiles);
|
||||||
indexCreator.setIndexAddress(indexAddress);
|
indexCreator.setIndexAddress(indexAddress);
|
||||||
indexCreator.setIndexPOI(indexPOI);
|
indexCreator.setIndexPOI(indexPOI);
|
||||||
indexCreator.setIndexTransport(indexTransport);
|
indexCreator.setIndexTransport(indexTransport);
|
||||||
indexCreator.setLastModifiedDate(f.lastModified());
|
indexCreator.setLastModifiedDate(f.lastModified());
|
||||||
indexCreator.setNormalizeStreets(true);
|
indexCreator.setNormalizeStreets(true);
|
||||||
indexCreator.setSaveAddressWays(writeWayNodes);
|
indexCreator.setSaveAddressWays(saveAddressWays);
|
||||||
|
|
||||||
String regionName = f.getName();
|
|
||||||
int i = f.getName().indexOf('.');
|
|
||||||
if (i > -1) {
|
|
||||||
regionName = Algoritms.capitalizeFirstLetterAndLowercase(f.getName().substring(0, i));
|
|
||||||
}
|
|
||||||
String addressFileName = regionName + "_" + IndexConstants.ADDRESS_TABLE_VERSION + IndexConstants.ADDRESS_INDEX_EXT;
|
String addressFileName = regionName + "_" + IndexConstants.ADDRESS_TABLE_VERSION + IndexConstants.ADDRESS_INDEX_EXT;
|
||||||
indexCreator.setAddressFileName(addressFileName);
|
indexCreator.setAddressFileName(addressFileName);
|
||||||
String transportFileName = regionName + "_" + IndexConstants.TRANSPORT_TABLE_VERSION + IndexConstants.TRANSPORT_INDEX_EXT;
|
String transportFileName = regionName + "_" + IndexConstants.TRANSPORT_TABLE_VERSION + IndexConstants.TRANSPORT_INDEX_EXT;
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<ScrollView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent">
|
||||||
|
<LinearLayout android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent" android:orientation="vertical">
|
android:layout_height="fill_parent" android:orientation="vertical">
|
||||||
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1">
|
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1">
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
@ -22,8 +24,8 @@
|
||||||
<TextView android:text="@string/poi_dialog_comment" android:id="@+id/TextView" android:layout_marginLeft="5dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
|
<TextView android:text="@string/poi_dialog_comment" android:id="@+id/TextView" android:layout_marginLeft="5dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
|
||||||
<EditText android:text="@string/poi_dialog_comment_default" android:id="@+id/Comment" android:layout_marginLeft="5dp" android:layout_width ="100dp" android:layout_marginRight="5dp" android:layout_height="wrap_content"></EditText>
|
<EditText android:text="@string/poi_dialog_comment_default" android:id="@+id/Comment" android:layout_marginLeft="5dp" android:layout_width ="100dp" android:layout_marginRight="5dp" android:layout_height="wrap_content"></EditText>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableLayout>
|
|
||||||
|
|
||||||
|
</TableLayout>
|
||||||
<TextView android:text="@string/poi_dialog_other_tags_message" android:id="@+id/TextView" android:layout_marginLeft="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content"/>
|
<TextView android:text="@string/poi_dialog_other_tags_message" android:id="@+id/TextView" android:layout_marginLeft="5dp" android:layout_width="fill_parent" android:layout_height="wrap_content"/>
|
||||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"
|
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"
|
||||||
android:gravity="bottom|center">
|
android:gravity="bottom|center">
|
||||||
|
@ -31,3 +33,4 @@
|
||||||
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:text="@string/default_buttons_cancel" android:id="@+id/Cancel"></Button>
|
<Button android:layout_width="125dp" android:layout_height="wrap_content" android:text="@string/default_buttons_cancel" android:id="@+id/Cancel"></Button>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
Loading…
Reference in a new issue