Delete old impl
This commit is contained in:
parent
ae707c7f9b
commit
1439a4406c
5 changed files with 3 additions and 228 deletions
|
@ -5,8 +5,6 @@ import java.io.IOException;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import net.osmand.NativeLibrary;
|
import net.osmand.NativeLibrary;
|
||||||
import net.osmand.bridge.ObfInspector;
|
|
||||||
import net.osmand.bridge.StringVector;
|
|
||||||
|
|
||||||
public class BinaryInspectorNative {
|
public class BinaryInspectorNative {
|
||||||
|
|
||||||
|
@ -21,9 +19,9 @@ public class BinaryInspectorNative {
|
||||||
args = new String[]{"-vmap", "-bbox=11.3,47.1,11.6,47", "/home/victor/projects/OsmAnd/data/osm-gen/Austria_2.obf"};
|
args = new String[]{"-vmap", "-bbox=11.3,47.1,11.6,47", "/home/victor/projects/OsmAnd/data/osm-gen/Austria_2.obf"};
|
||||||
// test cases show info
|
// test cases show info
|
||||||
NativeLibrary.loadAllLibs(null);
|
NativeLibrary.loadAllLibs(null);
|
||||||
StringVector vector = new StringVector();
|
// StringVector vector = new StringVector();
|
||||||
Collections.addAll(vector, args);
|
// Collections.addAll(vector, args);
|
||||||
ObfInspector.inspector(vector);
|
// ObfInspector.inspector(vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void printUsage(String warning) {
|
public static void printUsage(String warning) {
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
|
||||||
* Version 2.0.7
|
|
||||||
*
|
|
||||||
* Do not make changes to this file unless you know what you are doing--modify
|
|
||||||
* the SWIG interface file instead.
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
package net.osmand.bridge;
|
|
||||||
|
|
||||||
public class CoreOsmAnd {
|
|
||||||
public static int get31TileNumberX(double longitude) {
|
|
||||||
return CoreOsmAndJNI.get31TileNumberX(longitude);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int get31TileNumberY(double latitude) {
|
|
||||||
return CoreOsmAndJNI.get31TileNumberY(latitude);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double get31LongitudeX(int x) {
|
|
||||||
return CoreOsmAndJNI.get31LongitudeX(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double get31LatitudeY(int y) {
|
|
||||||
return CoreOsmAndJNI.get31LatitudeY(y);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double getTileNumberX(float zoom, double longitude) {
|
|
||||||
return CoreOsmAndJNI.getTileNumberX(zoom, longitude);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double getTileNumberY(float zoom, double latitude) {
|
|
||||||
return CoreOsmAndJNI.getTileNumberY(zoom, latitude);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double checkLatitude(double latitude) {
|
|
||||||
return CoreOsmAndJNI.checkLatitude(latitude);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double checkLongitude(double longitude) {
|
|
||||||
return CoreOsmAndJNI.checkLongitude(longitude);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double getPowZoom(float zoom) {
|
|
||||||
return CoreOsmAndJNI.getPowZoom(zoom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double getLongitudeFromTile(float zoom, double x) {
|
|
||||||
return CoreOsmAndJNI.getLongitudeFromTile(zoom, x);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double getLatitudeFromTile(float zoom, double y) {
|
|
||||||
return CoreOsmAndJNI.getLatitudeFromTile(zoom, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
|
||||||
* Version 2.0.7
|
|
||||||
*
|
|
||||||
* Do not make changes to this file unless you know what you are doing--modify
|
|
||||||
* the SWIG interface file instead.
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
package net.osmand.bridge;
|
|
||||||
|
|
||||||
public class CoreOsmAndJNI {
|
|
||||||
public final static native long new_StringVector__SWIG_0();
|
|
||||||
public final static native long new_StringVector__SWIG_1(long jarg1);
|
|
||||||
public final static native long StringVector_size(long jarg1, StringVector jarg1_);
|
|
||||||
public final static native long StringVector_capacity(long jarg1, StringVector jarg1_);
|
|
||||||
public final static native void StringVector_reserve(long jarg1, StringVector jarg1_, long jarg2);
|
|
||||||
public final static native boolean StringVector_isEmpty(long jarg1, StringVector jarg1_);
|
|
||||||
public final static native void StringVector_clear(long jarg1, StringVector jarg1_);
|
|
||||||
public final static native void StringVector_add(long jarg1, StringVector jarg1_, String jarg2);
|
|
||||||
public final static native String StringVector_get(long jarg1, StringVector jarg1_, int jarg2);
|
|
||||||
public final static native void StringVector_set(long jarg1, StringVector jarg1_, int jarg2, String jarg3);
|
|
||||||
public final static native void delete_StringVector(long jarg1);
|
|
||||||
public final static native int ObfInspector_inspector(long jarg1, StringVector jarg1_);
|
|
||||||
public final static native long new_ObfInspector();
|
|
||||||
public final static native void delete_ObfInspector(long jarg1);
|
|
||||||
public final static native int get31TileNumberX(double jarg1);
|
|
||||||
public final static native int get31TileNumberY(double jarg1);
|
|
||||||
public final static native double get31LongitudeX(int jarg1);
|
|
||||||
public final static native double get31LatitudeY(int jarg1);
|
|
||||||
public final static native double getTileNumberX(float jarg1, double jarg2);
|
|
||||||
public final static native double getTileNumberY(float jarg1, double jarg2);
|
|
||||||
public final static native double checkLatitude(double jarg1);
|
|
||||||
public final static native double checkLongitude(double jarg1);
|
|
||||||
public final static native double getPowZoom(float jarg1);
|
|
||||||
public final static native double getLongitudeFromTile(float jarg1, double jarg2);
|
|
||||||
public final static native double getLatitudeFromTile(float jarg1, double jarg2);
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
|
||||||
* Version 2.0.7
|
|
||||||
*
|
|
||||||
* Do not make changes to this file unless you know what you are doing--modify
|
|
||||||
* the SWIG interface file instead.
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
package net.osmand.bridge;
|
|
||||||
|
|
||||||
public class ObfInspector {
|
|
||||||
private long swigCPtr;
|
|
||||||
protected boolean swigCMemOwn;
|
|
||||||
|
|
||||||
protected ObfInspector(long cPtr, boolean cMemoryOwn) {
|
|
||||||
swigCMemOwn = cMemoryOwn;
|
|
||||||
swigCPtr = cPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static long getCPtr(ObfInspector obj) {
|
|
||||||
return (obj == null) ? 0 : obj.swigCPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void finalize() {
|
|
||||||
delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
public synchronized void delete() {
|
|
||||||
if (swigCPtr != 0) {
|
|
||||||
if (swigCMemOwn) {
|
|
||||||
swigCMemOwn = false;
|
|
||||||
CoreOsmAndJNI.delete_ObfInspector(swigCPtr);
|
|
||||||
}
|
|
||||||
swigCPtr = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int inspector(StringVector argv) {
|
|
||||||
return CoreOsmAndJNI.ObfInspector_inspector(StringVector.getCPtr(argv), argv);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ObfInspector() {
|
|
||||||
this(CoreOsmAndJNI.new_ObfInspector(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,84 +0,0 @@
|
||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
|
||||||
* Version 2.0.7
|
|
||||||
*
|
|
||||||
* Do not make changes to this file unless you know what you are doing--modify
|
|
||||||
* the SWIG interface file instead.
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
package net.osmand.bridge;
|
|
||||||
|
|
||||||
import java.util.AbstractList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class StringVector extends AbstractList<String> {
|
|
||||||
private long swigCPtr;
|
|
||||||
protected boolean swigCMemOwn;
|
|
||||||
|
|
||||||
protected StringVector(long cPtr, boolean cMemoryOwn) {
|
|
||||||
swigCMemOwn = cMemoryOwn;
|
|
||||||
swigCPtr = cPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static long getCPtr(StringVector obj) {
|
|
||||||
return (obj == null) ? 0 : obj.swigCPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void finalize() {
|
|
||||||
delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
public synchronized void delete() {
|
|
||||||
if (swigCPtr != 0) {
|
|
||||||
if (swigCMemOwn) {
|
|
||||||
swigCMemOwn = false;
|
|
||||||
CoreOsmAndJNI.delete_StringVector(swigCPtr);
|
|
||||||
}
|
|
||||||
swigCPtr = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public StringVector() {
|
|
||||||
this(CoreOsmAndJNI.new_StringVector__SWIG_0(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public StringVector(long n) {
|
|
||||||
this(CoreOsmAndJNI.new_StringVector__SWIG_1(n), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int size() {
|
|
||||||
return (int) CoreOsmAndJNI.StringVector_size(swigCPtr, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public long capacity() {
|
|
||||||
return CoreOsmAndJNI.StringVector_capacity(swigCPtr, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reserve(long n) {
|
|
||||||
CoreOsmAndJNI.StringVector_reserve(swigCPtr, this, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return CoreOsmAndJNI.StringVector_isEmpty(swigCPtr, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void clear() {
|
|
||||||
CoreOsmAndJNI.StringVector_clear(swigCPtr, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean add(String x) {
|
|
||||||
CoreOsmAndJNI.StringVector_add(swigCPtr, this, x);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String get(int i) {
|
|
||||||
return CoreOsmAndJNI.StringVector_get(swigCPtr, this, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String set(int i, String val) {
|
|
||||||
String prev = CoreOsmAndJNI.StringVector_get(swigCPtr, this, i);
|
|
||||||
CoreOsmAndJNI.StringVector_set(swigCPtr, this, i, val);
|
|
||||||
return prev;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue