Update vtm-jeo module, closes #52
This commit is contained in:
parent
51f3e2368b
commit
c02cf5792f
@ -37,7 +37,7 @@ def versionName() { return version }
|
||||
|
||||
subprojects {
|
||||
repositories {
|
||||
maven { url 'https://github.com/opensciencemap/maven-repo/raw/master/' }
|
||||
maven { url 'http://repo.boundlessgeo.com/main' }
|
||||
jcenter()
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.jeo.data.VectorDataset;
|
||||
import org.jeo.vector.VectorDataset;
|
||||
import org.jeo.map.Style;
|
||||
import org.oscim.layers.OSMIndoorLayer;
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2016 devemux86
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* 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.layers;
|
||||
|
||||
import static org.oscim.tiling.QueryResult.FAILED;
|
||||
@ -7,7 +23,7 @@ import static org.oscim.tiling.QueryResult.TILE_NOT_FOUND;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jeo.data.TileDataset;
|
||||
import org.jeo.tile.TileDataset;
|
||||
import org.jeo.tile.Tile;
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
@ -24,7 +40,7 @@ public class JeoTileSource extends TileSource {
|
||||
final TileDataset mTileDataset;
|
||||
|
||||
public JeoTileSource(TileDataset tileDataset) {
|
||||
log.debug("load tileset {}", tileDataset.getName());
|
||||
log.debug("load tileset {}", tileDataset.name());
|
||||
mTileDataset = tileDataset;
|
||||
//mTileDataset.pyramid().
|
||||
mZoomMax = 1;
|
||||
@ -47,7 +63,7 @@ public class JeoTileSource extends TileSource {
|
||||
sink.completed(TILE_NOT_FOUND);
|
||||
return;
|
||||
}
|
||||
Bitmap b = CanvasAdapter.decodeBitmap(new ByteArrayInputStream(t.getData()));
|
||||
Bitmap b = CanvasAdapter.decodeBitmap(new ByteArrayInputStream(t.data()));
|
||||
sink.setTileImage(b);
|
||||
log.debug("success {}", tile);
|
||||
sink.completed(SUCCESS);
|
||||
|
@ -1,10 +1,26 @@
|
||||
/*
|
||||
* Copyright 2016 devemux86
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* 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.layers;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jeo.data.Query;
|
||||
import org.jeo.data.VectorDataset;
|
||||
import org.jeo.feature.Feature;
|
||||
import org.jeo.vector.VectorQuery;
|
||||
import org.jeo.vector.VectorDataset;
|
||||
import org.jeo.vector.Feature;
|
||||
import org.jeo.geom.Geom;
|
||||
import org.jeo.map.CartoCSS;
|
||||
import org.jeo.map.RGB;
|
||||
@ -40,7 +56,7 @@ public class JeoVectorLayer extends JtsLayer {
|
||||
super(map);
|
||||
mDataset = data;
|
||||
|
||||
mRules = style.getRules().selectById(data.getName(), true).flatten();
|
||||
mRules = style.getRules().selectById(data.name(), true).flatten();
|
||||
//mRules = style.getRules().selectById("way", true).flatten();
|
||||
log.debug(mRules.toString());
|
||||
|
||||
@ -58,7 +74,7 @@ public class JeoVectorLayer extends JtsLayer {
|
||||
}
|
||||
|
||||
try {
|
||||
Query q = new Query().bounds(b);
|
||||
VectorQuery q = new VectorQuery().bounds(b);
|
||||
if (dbg)
|
||||
log.debug("query {}", b);
|
||||
for (Feature f : mDataset.cursor(q)) {
|
||||
@ -104,7 +120,7 @@ public class JeoVectorLayer extends JtsLayer {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("Error querying layer " + mDataset.getName() + e);
|
||||
log.error("Error querying layer " + mDataset.name() + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2016 devemux86
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* 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.layers;
|
||||
|
||||
import org.jeo.geom.CoordinatePath;
|
||||
@ -43,7 +59,7 @@ public abstract class JtsLayer extends AbstractVectorLayer<Geometry> {
|
||||
float x = (float) ((MercatorProjection.longitudeToX(c.x) - pos.x) * scale);
|
||||
float y = (float) ((MercatorProjection.latitudeToY(c.y) - pos.y) * scale);
|
||||
|
||||
switch (path.getStep()) {
|
||||
switch (path.step()) {
|
||||
case MOVE_TO:
|
||||
if (g.isPoly())
|
||||
g.startPolygon();
|
||||
|
@ -1,9 +1,25 @@
|
||||
/*
|
||||
* Copyright 2016 devemux86
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* 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.layers;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.jeo.data.VectorDataset;
|
||||
import org.jeo.feature.Feature;
|
||||
import org.jeo.vector.VectorDataset;
|
||||
import org.jeo.vector.Feature;
|
||||
import org.jeo.map.CartoCSS;
|
||||
import org.jeo.map.RGB;
|
||||
import org.jeo.map.Rule;
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2016 devemux86
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* 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.test;
|
||||
|
||||
import java.io.File;
|
||||
@ -8,14 +24,14 @@ import java.io.InputStream;
|
||||
|
||||
import org.jeo.carto.Carto;
|
||||
import org.jeo.data.Dataset;
|
||||
import org.jeo.data.Query;
|
||||
import org.jeo.data.VectorDataset;
|
||||
import org.jeo.vector.VectorQuery;
|
||||
import org.jeo.vector.VectorDataset;
|
||||
import org.jeo.data.mem.MemVector;
|
||||
import org.jeo.data.mem.MemWorkspace;
|
||||
import org.jeo.feature.Feature;
|
||||
import org.jeo.feature.Features;
|
||||
import org.jeo.feature.Schema;
|
||||
import org.jeo.feature.SchemaBuilder;
|
||||
import org.jeo.vector.Feature;
|
||||
import org.jeo.vector.Features;
|
||||
import org.jeo.vector.Schema;
|
||||
import org.jeo.vector.SchemaBuilder;
|
||||
import org.jeo.geojson.GeoJSONDataset;
|
||||
import org.jeo.geojson.GeoJSONReader;
|
||||
import org.jeo.geom.GeomBuilder;
|
||||
@ -115,7 +131,7 @@ public class JeoTest {
|
||||
try {
|
||||
|
||||
Schema s = data.schema();
|
||||
Query q = new Query();
|
||||
VectorQuery q = new VectorQuery();
|
||||
|
||||
MemVector memData = mem.create(s);
|
||||
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2016 devemux86
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* 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.theme.carto;
|
||||
|
||||
import static java.lang.System.out;
|
||||
@ -5,7 +21,7 @@ import static java.lang.System.out;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jeo.feature.BasicFeature;
|
||||
import org.jeo.vector.BasicFeature;
|
||||
import org.oscim.core.Tag;
|
||||
import org.oscim.core.TagSet;
|
||||
|
||||
@ -43,8 +59,9 @@ class MatcherFeature extends BasicFeature {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(String key, Object val) {
|
||||
public BasicFeature put(String key, Object val) {
|
||||
out.println("EEEK put()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -66,9 +83,8 @@ class MatcherFeature extends BasicFeature {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(int arg0, Object arg1) {
|
||||
public BasicFeature set(int arg0, Object arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2016 devemux86
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* 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.test.jeo;
|
||||
|
||||
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
||||
@ -7,7 +23,7 @@ import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
|
||||
import org.jeo.data.VectorDataset;
|
||||
import org.jeo.vector.VectorDataset;
|
||||
import org.jeo.map.Style;
|
||||
import org.oscim.gdx.GdxMap;
|
||||
import org.oscim.gdx.GdxMapApp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user