import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.VisitorSupport;
import org.dom4j.XPath;
import org.dom4j.io.SAXReader;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.io.WKTReader;
public class Test3 {
/**
* @param args
* @throws DocumentException
*/
public static void main(String[] args) throws DocumentException {
// TODO Auto-generated method stub
Map map = new HashMap();
map.put("","http://www.opengis.net/gml");
SAXReader saxReader = new SAXReader();
File file = new File("E:\\City.xml");
Document document = saxReader.read(file);
XPath x = document.createXPath("//gml:");
x.setNamespaceURIs(map);
GML解析读入PostGIS
最新推荐文章于 2024-08-18 00:30:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)