All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.zw201913.response.BoundsResponse Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
package com.github.zw201913.response;

import lombok.Getter;
import lombok.ToString;
import org.apache.commons.lang3.ArrayUtils;

/**
 * @author zouwei
 * @className BoundsResponse
 * @date: 2022/8/12 下午8:52
 * @description:
 */
@Getter
@ToString(callSuper = true)
public class BoundsResponse extends BaseResponse {

	private Polygon bounds;

	public double[][] getCoordinates() {
		if (this.bounds == null) {
			return null;
		}
		double[][][] coordinates = this.bounds.getCoordinates();
		if (ArrayUtils.isEmpty(coordinates)) {
			return null;
		}
		return coordinates[0];
	}

	@Getter
	@ToString
	public static class Polygon {
		private String type;
		private double[][][] coordinates;
	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy