move oscimap to oscimap2

This commit is contained in:
Hannes Janetzek
2013-05-22 12:40:54 +02:00
parent 127deb0655
commit 4d06977633
5 changed files with 16 additions and 12 deletions

View File

@@ -40,15 +40,19 @@ public final class MapDatabaseFactory {
*/
public static IMapDatabase createMapDatabase(MapDatabases mapDatabase) {
switch (mapDatabase) {
case MAP_READER:
case MAPSFORGE_FILE:
return new org.oscim.database.mapfile.MapDatabase();
case TEST_READER:
return new org.oscim.database.test.MapDatabase();
case PBMAP_READER:
//return new org.oscim.database.pbmap.MapDatabase();
return new org.oscim.database.mapnik.MapDatabase();
return new org.oscim.database.pbmap.MapDatabase();
case OSCIMAP_READER:
return new org.oscim.database.oscimap.MapDatabase();
return new org.oscim.database.oscimap2.MapDatabase();
case OPENSCIENCEMAP4:
return new org.oscim.database.oscimap4.MapDatabase();
case MAPNIK_VECTOR:
return new org.oscim.database.mapnik.MapDatabase();
default:
break;

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.oscim.database.oscimap;
package org.oscim.database.oscimap2;
import java.io.File;
import java.io.FileInputStream;

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.oscim.database.oscimap;
package org.oscim.database.oscimap2;
import java.io.File;
import java.io.IOException;
@@ -28,7 +28,7 @@ import org.oscim.core.MapElement;
import org.oscim.core.Tag;
import org.oscim.core.Tile;
import org.oscim.database.IMapDatabase;
import org.oscim.database.IMapDatabaseCallback;
import org.oscim.database.IMapDataSink;
import org.oscim.database.MapInfo;
import org.oscim.database.MapOptions;
import org.oscim.layers.tile.MapTile;
@@ -65,7 +65,7 @@ public class MapDatabase implements IMapDatabase {
private Tag[] curTags = new Tag[MAX_TILE_TAGS];
private int mCurTagCnt;
private IMapDatabaseCallback mMapGenerator;
private IMapDataSink mMapGenerator;
private float mScaleFactor;
private MapTile mTile;
@@ -81,12 +81,12 @@ public class MapDatabase implements IMapDatabase {
}
@Override
public QueryResult executeQuery(MapTile tile, IMapDatabaseCallback mapDatabaseCallback) {
public QueryResult executeQuery(MapTile tile, IMapDataSink mapDataSink) {
QueryResult result = QueryResult.SUCCESS;
mTile = tile;
mMapGenerator = mapDatabaseCallback;
mMapGenerator = mapDataSink;
// scale coordinates to tile size
mScaleFactor = REF_TILE_SIZE / Tile.SIZE;
@@ -418,7 +418,7 @@ public class MapDatabase implements IMapDatabase {
break;
}
mMapGenerator.renderElement(mElem);
mMapGenerator.process(mElem);
return true;
}

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.oscim.database.oscimap;
package org.oscim.database.oscimap2;
import org.oscim.core.Tag;