1 /********************************************************************** 2 * 3 * GEOS - Geometry Engine Open Source 4 * http://geos.osgeo.org 5 * 6 * Copyright (C) 2016 Daniel Baston 7 * 8 * This is free software; you can redistribute and/or modify it under 9 * the terms of the GNU Lesser General Public Licence as published 10 * by the Free Software Foundation. 11 * See the COPYING file for more information. 12 * 13 ********************************************************************** 14 * 15 * Last port: index/strtree/GeometryItemDistance.java (JTS-1.14) 16 * 17 **********************************************************************/ 18 19 #ifndef GEOS_INDEX_STRTREE_GEOMETRYITEMDISTANCE_H 20 #define GEOS_INDEX_STRTREE_GEOMETRYITEMDISTANCE_H 21 22 #include <geos/geom/Geometry.h> 23 #include <geos/index/strtree/ItemDistance.h> 24 25 namespace geos { 26 namespace index { 27 namespace strtree { 28 class GEOS_DLL GeometryItemDistance : public ItemDistance { 29 public: 30 /** 31 * Computes the distance between two {@link Geometry} items, 32 * using the {@link Geometry#distance(Geometry)} method. 33 * 34 * @param item1 an item which is a Geometry 35 * @param item2 an item which is a Geometry 36 * @return the distance between the geometries 37 * @throws ClassCastException if either item is not a Geometry 38 */ 39 double distance(const ItemBoundable* item1, const ItemBoundable* item2) override; 40 }; 41 } 42 } 43 } 44 45 #endif //GEOS_GEOMETRYITEMDISTANCE_H 46