private static String getLocationPart(@NonNull final Geocache cache, final int partIndex) {
        final String location = cache.getLocation();
        if (StringUtils.contains(location, ", ")) {
            final String[] parts = StringUtils.split(location, ',');
            if (parts.length == 2) {
                return StringUtils.trim(parts[partIndex]);
            }
        }
        return StringUtils.EMPTY;
    }
Writes one waypoint entry for cache waypoint.
main/src/main/java/cgeo/geocaching/export/GpxSerializer.java