Skip to content

Commit

Permalink
Renaming InteriorPoint internal objects
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Nov 29, 2023
1 parent ac92f41 commit cbd7086
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ public static Coordinate getInteriorPoint(Geometry geom) {
return null;

Coordinate interiorPt = null;
//int dim = geom.getDimension();
int dim = effectiveDimension(geom);
int dim = dimensionNonEmpty(geom);
// this should not happen, but just in case...
if (dim < 0) {
return null;
Expand All @@ -77,13 +76,13 @@ else if (dim == 1) {
return interiorPt;
}

private static int effectiveDimension(Geometry geom) {
EffectiveDimensionFilter dimFilter = new EffectiveDimensionFilter();
private static int dimensionNonEmpty(Geometry geom) {
DimensionNonEmptyFilter dimFilter = new DimensionNonEmptyFilter();
geom.apply(dimFilter);
return dimFilter.getDimension();
}

private static class EffectiveDimensionFilter implements GeometryFilter
private static class DimensionNonEmptyFilter implements GeometryFilter
{
private int dim = -1;

Expand Down

0 comments on commit cbd7086

Please sign in to comment.