/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2013, Open Source Geospatial Foundation (OSGeo) * * 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; * version 2.1 of the License. * * 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. */ package org.geotools.data.sqlserver; import org.geotools.geometry.jts.coordinatesequence.CoordinateSequences; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryComponentFilter; class GeometryDimensionFinder implements GeometryComponentFilter { boolean z = false; @Override public void filter(Geometry geom) { if(geom != null) { z |= CoordinateSequences.coordinateDimension(geom) > 2; } } public boolean hasZ() { return z; } }