20 package org.matsim.utils.gis.shp2matsim;
23 import java.util.List;
24 import java.util.stream.Collectors;
26 import org.locationtech.jts.geom.Geometry;
27 import org.locationtech.jts.geom.Point;
28 import org.locationtech.jts.geom.Polygonal;
29 import org.locationtech.jts.geom.prep.PreparedGeometry;
30 import org.locationtech.jts.geom.prep.PreparedGeometryFactory;
31 import org.locationtech.jts.geom.prep.PreparedPolygon;
40 .map(sf -> (Geometry)sf.getDefaultGeometry())
41 .collect(Collectors.toList());
45 PreparedGeometryFactory factory =
new PreparedGeometryFactory();
48 .map(sf -> factory.create((Geometry)sf.getDefaultGeometry()))
49 .collect(Collectors.toList());
55 .map(sf ->
new PreparedPolygon((Polygonal)sf.getDefaultGeometry()))
56 .collect(Collectors.toList());
61 return geometries.stream().anyMatch(g -> g.contains(point));
66 return geometries.stream().anyMatch(g -> g.contains(point));
static List< PreparedGeometry > loadPreparedGeometries(URL url)
static boolean isCoordInPreparedGeometries(Coord coord, List< PreparedGeometry > geometries)
static boolean isCoordInGeometries(Coord coord, List< Geometry > geometries)
static Collection< SimpleFeature > getAllFeatures(final String filename)
static List< PreparedPolygon > loadPreparedPolygons(URL url)
static List< Geometry > loadGeometries(URL url)