资源简介
用java解析WKT格式地理坐标,包含解析point linestring polygon等
里面包含了JTS源码和jar包,说明文档,还包含了测试用例,很全面哦
代码片段和文件信息
/*
* The JTS Topology Suite is a collection of Java classes that
* implement the fundamental operations required to validate a given
* geo-spatial data set to a known topological specification.
*
* Copyright (C) 2001 Vivid Solutions
*
* This library 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 2.1 of the License or (at your option) any later version.
*
* This library 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 library; if not write to the Free Software
* Foundation Inc. 59 Temple Place Suite 330 Boston MA 02111-1307 USA
*
* For more information contact:
*
* Vivid Solutions
* Suite #1A
* 2328 Government Street
* Victoria BC V8T 5G5
* Canada
*
* (250)385-6040
* www.vividsolutions.com
*/
package com.vividsolutions.jts.io.gml2;
import java.util.*;
import java.util.regex.Pattern;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import com.vividsolutions.jts.geom.*;
import com.vividsolutions.jts.io.gml2.GMLHandler.Handler;
/**
* Container for GML2 Geometry parsing strategies which can be represented in JTS.
*
* @author David Zwiers Vivid Solutions.
*/
public class GeometryStrategies{
/**
* This set of strategies is not expected to be used directly outside of this distribution.
*
* The implementation of this class are intended to be used as static function points in C. These strategies should be associated with an element when the element begins. The strategy is utilized at the end of the element to create an object of value to the user.
*
* In this case all the objects are either java.lang.* or JTS Geometry objects
*
* @author David Zwiers Vivid Solutions.
*/
static interface ParseStrategy{
/**
* @param arg Value to interpret
* @param gf GeometryFactory
* @return The interpreted value
* @throws SAXException
*/
object parse(Handler arg GeometryFactory gf) throws SAXException;
}
private static HashMap strategies = loadStrategies();
private static HashMap loadStrategies(){
HashMap strats = new HashMap();
// point
strats.put(GMLConstants.GML_POINT.toLowerCase()new ParseStrategy(){
public object parse(Handler arg GeometryFactory gf) throws SAXException {
// one child either a coord
// or a coordinate sequence
if(arg.children.size()!=1)
throw new SAXException(“Cannot create a point without exactly one coordinate“);
int srid = getSrid(arg.attrsgf.getSRID());
object c = arg
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2006-12-18 10:37 bin\
目录 0 2006-12-12 16:07 doc\
目录 0 2006-12-07 11:21 doc\javadoc\
目录 0 2006-12-07 11:20 doc\javadoc\com\
目录 0 2006-12-07 11:20 doc\javadoc\com\vividsolutions\
目录 0 2006-12-07 11:20 doc\javadoc\com\vividsolutions\jts\
目录 0 2006-12-07 11:20 doc\javadoc\com\vividsolutions\jts\algorithm\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\geom\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\geom\impl\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\geom\util\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\geomgraph\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\geomgraph\index\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\index\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\index\bintree\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\index\chain\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\index\quadtree\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\index\strtree\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\index\sweepline\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\io\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\linearref\
目录 0 2006-12-12 16:07 doc\javadoc\com\vividsolutions\jts\noding\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\noding\snapround\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\operation\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\operation\buffer\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\operation\distance\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\operation\linemerge\
目录 0 2006-12-12 16:07 doc\javadoc\com\vividsolutions\jts\operation\overlay\
目录 0 2006-12-12 16:07 doc\javadoc\com\vividsolutions\jts\operation\overlay\snap\
目录 0 2006-12-12 16:08 doc\javadoc\com\vividsolutions\jts\operation\overlay\validate\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\operation\polygonize\
目录 0 2006-12-07 11:21 doc\javadoc\com\vividsolutions\jts\operation\predicate\
............此处省略923个文件信息
评论
共有 条评论