use of com.revolsys.gis.grid.Bcgs20000RectangularMapGrid in project com.revolsys.open by revolsys.
the class MoepBinaryIterator method loadHeader.
private void loadHeader() throws IOException {
this.fileType = (byte) read();
if (this.fileType / 100 == 0) {
this.coordinateBytes = 2;
} else {
this.fileType %= 100;
this.coordinateBytes = 4;
}
String mapsheet = readString(11);
mapsheet = mapsheet.replaceAll("\\.", "").toLowerCase();
final Bcgs20000RectangularMapGrid bcgsGrid = new Bcgs20000RectangularMapGrid();
final UtmRectangularMapGrid utmGrid = new UtmRectangularMapGrid();
final double latitude = bcgsGrid.getLatitude(mapsheet) + 0.05;
final double longitude = bcgsGrid.getLongitude(mapsheet) - 0.1;
final int crsId = utmGrid.getNad83Srid(longitude, latitude);
final CoordinateSystem coordinateSystem = EpsgCoordinateSystems.getCoordinateSystem(crsId);
final String submissionDateString = readString(6);
final double centreX = readLEInt(this.in);
final double centreY = readLEInt(this.in);
this.center = new PointDoubleXY(centreX, centreY);
this.factory = GeometryFactory.fixed3d(coordinateSystem.getCoordinateSystemId(), 1.0, 1.0, 1.0);
setProperty(IoConstants.GEOMETRY_FACTORY, this.factory);
}
Aggregations