/** * Creates a new UTM projection instance. * * @param zoneIndex the zne as zero-based index, e.g. 31 for zone 32 * @param south false, if the zone is on the northern hemisphere * * @return the new projection */ public static UTMProjection create(int zoneIndex, boolean south) { return create(UTM.getProjectionName(zoneIndex, south), zoneIndex, south); }
/** * Creates an UTM map projection for the specified parameters. * * @param zoneIndex the zone index in the range 0 to {@link #MAX_UTM_ZONE} - 1. * @param south whether or not the projection is defined for the southern hemispere * * @return an UTM map projection * * @see #getProjectionName */ public static UTMProjection createProjection(int zoneIndex, boolean south) { return createProjection(getProjectionName(zoneIndex, south), zoneIndex, south); }
/** * Gets the UTM projection suitable for the given geodetic coordinate. * * @param geoPos a geodetic coordinate * * @return a suitable UTM projection */ public static MapProjection getSuitableProjection(final GeoPos geoPos) { int zoneIndex = getZoneIndex(geoPos.getLon()); final boolean south = geoPos.getLat() < 0.0; final String projName = getProjectionName(zoneIndex, south); MapProjection projection = MapProjectionRegistry.getProjection(projName); return projection; }