⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connectedelementlocationfilter.cpp

📁 在Linux下做的QuadTree的程序
💻 CPP
字号:
/********************************************************************** * $Id: ConnectedElementLocationFilter.cpp 1820 2006-09-06 16:54:23Z mloskot $ * * GEOS - Geometry Engine Open Source * http://geos.refractions.net * * Copyright (C) 2001-2002 Vivid Solutions Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as published * by the Free Software Foundation.  * See the COPYING file for more information. * **********************************************************************/#include <geos/operation/distance/ConnectedElementLocationFilter.h>#include <geos/operation/distance/GeometryLocation.h>#include <geos/geom/Geometry.h>#include <geos/geom/Point.h>#include <geos/geom/LineString.h>#include <geos/geom/LinearRing.h>#include <geos/geom/Polygon.h>#include <vector>#include <typeinfo>using namespace std;using namespace geos::geom;namespace geos {namespace operation { // geos.operationnamespace distance { // geos.operation.distance/*public*/vector<GeometryLocation*>*ConnectedElementLocationFilter::getLocations(const Geometry *geom){	vector<GeometryLocation*> *loc=new vector<GeometryLocation*>();	ConnectedElementLocationFilter c(loc);	geom->apply_ro(&c);	return loc;}voidConnectedElementLocationFilter::filter_ro(const Geometry *geom){	if ((typeid(*geom)==typeid(Point)) ||		(typeid(*geom)==typeid(LineString)) ||		(typeid(*geom)==typeid(LinearRing)) ||		(typeid(*geom)==typeid(Polygon)))	{		locations->push_back(new GeometryLocation(geom, 0, *(geom->getCoordinate())));	}}void ConnectedElementLocationFilter::filter_rw(Geometry *geom){	if ((typeid(*geom)==typeid(Point)) ||		(typeid(*geom)==typeid(LineString)) ||		(typeid(*geom)==typeid(LinearRing)) ||		(typeid(*geom)==typeid(Polygon)))			locations->push_back(new GeometryLocation(geom, 0, *(geom->getCoordinate())));}} // namespace geos.operation.distance} // namespace geos.operation} // namespace geos/********************************************************************** * $Log$ * Revision 1.7  2006/03/21 17:55:01  strk * opDistance.h header split * * Revision 1.6  2006/03/03 10:46:21  strk * Removed 'using namespace' from headers, added missing headers in .cpp files, removed useless includes in headers (bug#46) * * Revision 1.5  2006/02/19 19:46:49  strk * Packages <-> namespaces mapping for most GEOS internal code (uncomplete, but working). Dir-level libs for index/ subdirs. * **********************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -