当前位置: 首页>>代码示例>>Java>>正文


Java ParseException.printStackTrace方法代码示例

本文整理汇总了Java中com.vividsolutions.jts.io.ParseException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java ParseException.printStackTrace方法的具体用法?Java ParseException.printStackTrace怎么用?Java ParseException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vividsolutions.jts.io.ParseException的用法示例。


在下文中一共展示了ParseException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.crosses(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:CrossesMeasure.java

示例2: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.equals(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:EqualsMeasure.java

示例3: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.coveredBy(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:CoveredbyMeasure.java

示例4: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.overlaps(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:OverlapsMeasure.java

示例5: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.touches(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:TouchesMeasure.java

示例6: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.within(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:WithinMeasure.java

示例7: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.disjoint(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:DisjointMeasure.java

示例8: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.intersects(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:IntersectsMeasure.java

示例9: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.contains(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:ContainsMeasure.java

示例10: getSimilarity

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
@Override
public double getSimilarity(Object object1, Object object2) {
    // expects WKT Strings
    String sWKT, tWKT;
    Geometry sGeo, tGeo;
    sWKT = object1.toString();
    tWKT = object2.toString();
    WKTReader reader = new WKTReader();
    try {
        sGeo = reader.read(sWKT);
        tGeo = reader.read(tWKT);
    } catch (ParseException e) {
        e.printStackTrace();
        return 0d;
    }
    return sGeo.covers(tGeo) ? 1d : 0d;
}
 
开发者ID:dice-group,项目名称:LIMES,代码行数:18,代码来源:CoversMeasure.java

示例11: wktTest

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
public static void wktTest() {
    GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(null);

    WKTReader reader = new WKTReader(geometryFactory);
    try {
        Polygon polygon = (Polygon) reader.read("POLYGON((20 10, 30 0, 40 10, 30 20, 20 10))");
        MultiPolygon multiPolygon = geometryFactory.createMultiPolygon(new Polygon[]{polygon});
        System.out.println(multiPolygon.toText());
    } catch (ParseException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
 
开发者ID:STEMLab,项目名称:JInedit,代码行数:14,代码来源:test.java

示例12: createPlace

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
public void createPlace(String identifier, String name, String shape) {
	enableAuthentication();
	Place p = new Place();
	p.setIdentifier(identifier);
	p.setTitle(name);
	WKTReader r = new WKTReader();
	try {
		p.setShape(r.read(shape));
	} catch (ParseException e) {
		e.printStackTrace();
	}
	data.push(p);
	placeService.save(p);
	disableAuthentication();
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:16,代码来源:TestDataManager.java

示例13: getWktPolygon

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
public com.vividsolutions.jts.geom.Polygon getWktPolygon() {
    if(wktPolygon == null && points != null && points.size() > 0){
        try {
            wktPolygon = (com.vividsolutions.jts.geom.Polygon) CommonFunctions.getInstance().getWktReader()
                    .read("POLYGON ((" + feature.getCoordinates() + "))");
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
    return wktPolygon;
}
 
开发者ID:MASTUSAID,项目名称:MAST-MOBILE,代码行数:12,代码来源:MapFeature.java

示例14: getWktLine

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
public LineString getWktLine() {
    if(wktLine == null && points != null && points.size() > 0){
        try {
            wktLine = (com.vividsolutions.jts.geom.LineString) CommonFunctions.getInstance().getWktReader()
                    .read("LINESTRING (" + feature.getCoordinates() + ")");
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
    return wktLine;
}
 
开发者ID:MASTUSAID,项目名称:MAST-MOBILE,代码行数:12,代码来源:MapFeature.java

示例15: getWktPoint

import com.vividsolutions.jts.io.ParseException; //导入方法依赖的package包/类
public com.vividsolutions.jts.geom.Point getWktPoint() {
    if(wktPoint == null && points != null && points.size() > 0){
        try {
            wktPoint = (com.vividsolutions.jts.geom.Point) CommonFunctions.getInstance().getWktReader()
                    .read("POINT (" + feature.getCoordinates() + ")");
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
    return wktPoint;
}
 
开发者ID:MASTUSAID,项目名称:MAST-MOBILE,代码行数:12,代码来源:MapFeature.java


注:本文中的com.vividsolutions.jts.io.ParseException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。