kopia lustrzana https://github.com/onthegomap/planetiler
				
				
				
			remove the old TileEncodingResult (#642)
* remove the old TileEncodingResult ...only to be merged once planetiler-openmaptile has been updated * update pt-omt --------- Co-authored-by: Mike Barry <msb5014@gmail.com>pull/643/head
							rodzic
							
								
									5ef73ac755
								
							
						
					
					
						commit
						a1c33dc5d5
					
				| 
						 | 
				
			
			@ -48,11 +48,6 @@ public interface WriteableTileArchive extends Closeable {
 | 
			
		|||
 | 
			
		||||
    void write(TileEncodingResult encodingResult);
 | 
			
		||||
 | 
			
		||||
    // TODO: exists for compatibility reasons
 | 
			
		||||
    default void write(com.onthegomap.planetiler.mbtiles.TileEncodingResult encodingResult) {
 | 
			
		||||
      write(new TileEncodingResult(encodingResult.coord(), encodingResult.tileData(), encodingResult.tileDataHash()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    void close();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,44 +0,0 @@
 | 
			
		|||
package com.onthegomap.planetiler.mbtiles;
 | 
			
		||||
 | 
			
		||||
import com.onthegomap.planetiler.geo.TileCoord;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import java.util.OptionalLong;
 | 
			
		||||
 | 
			
		||||
// TODO: exists for compatibility reasons
 | 
			
		||||
public record TileEncodingResult(
 | 
			
		||||
  TileCoord coord,
 | 
			
		||||
  byte[] tileData,
 | 
			
		||||
  /** will always be empty in non-compact mode and might also be empty in compact mode */
 | 
			
		||||
  OptionalLong tileDataHash
 | 
			
		||||
) {
 | 
			
		||||
 | 
			
		||||
  @Override
 | 
			
		||||
  public int hashCode() {
 | 
			
		||||
    final int prime = 31;
 | 
			
		||||
    int result = 1;
 | 
			
		||||
    result = prime * result + Arrays.hashCode(tileData);
 | 
			
		||||
    result = prime * result + Objects.hash(coord, tileDataHash);
 | 
			
		||||
    return result;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @Override
 | 
			
		||||
  public boolean equals(Object obj) {
 | 
			
		||||
    if (this == obj) {
 | 
			
		||||
      return true;
 | 
			
		||||
    }
 | 
			
		||||
    if (!(obj instanceof TileEncodingResult)) {
 | 
			
		||||
      return false;
 | 
			
		||||
    }
 | 
			
		||||
    TileEncodingResult other = (TileEncodingResult) obj;
 | 
			
		||||
    return Objects.equals(coord, other.coord) && Arrays.equals(tileData, other.tileData) &&
 | 
			
		||||
      Objects.equals(tileDataHash, other.tileDataHash);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @Override
 | 
			
		||||
  public String toString() {
 | 
			
		||||
    return "TileEncodingResult [coord=" + coord + ", tileData=" + Arrays.toString(tileData) + ", tileDataHash=" +
 | 
			
		||||
      tileDataHash + "]";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
Subproject commit 6317d82ec9dff205cd2de90d020433592009e807
 | 
			
		||||
Subproject commit dd5454365016d9e3b3eec2cd1299bd50d3fcccd9
 | 
			
		||||
		Ładowanie…
	
		Reference in New Issue