use of com.revolsys.io.channels.ChannelWriter in project com.revolsys.open by revolsys.
the class EpsgCoordinateSystemsLoader method loadAlias.
private void loadAlias() {
try (final RecordReader reader = newReader("/public/epsg_alias", "alias_code");
ChannelWriter writer = newWriter("alias")) {
for (final Record record : reader) {
writeInt(writer, record, "alias_code");
writeString(writer, record, "object_table_name");
writeInt(writer, record, "object_code");
writeInt(writer, record, "naming_system_code");
writeString(writer, record, "alias");
}
}
}
use of com.revolsys.io.channels.ChannelWriter in project com.revolsys.open by revolsys.
the class EpsgCoordinateSystemsLoader method loadCoordOperationParamValue.
private void loadCoordOperationParamValue() {
try (RecordReader reader = newReader("/public/epsg_coordoperationparamvalue");
ChannelWriter writer = newWriter("coordOperationParamValue")) {
for (final Record record : reader) {
writeInt(writer, record, "coord_op_code");
writeInt(writer, record, "coord_op_method_code");
writeInt(writer, record, "parameter_code");
writeDouble(writer, record, "parameter_value");
writeString(writer, record, "param_value_file_ref");
writeInt(writer, record, "uom_code", 0);
}
}
}
use of com.revolsys.io.channels.ChannelWriter in project com.revolsys.open by revolsys.
the class EpsgCoordinateSystemsLoader method loadCoordOperationPath.
private void loadCoordOperationPath() {
try (final RecordReader reader = newReader("/public/epsg_coordoperationpath", "concat_operation_code", "op_path_step");
ChannelWriter writer = newWriter("coordOperationPath")) {
for (final Record record : reader) {
writeInt(writer, record, "concat_operation_code");
writeInt(writer, record, "single_operation_code");
writeInt(writer, record, "op_path_step");
}
}
}
use of com.revolsys.io.channels.ChannelWriter in project com.revolsys.open by revolsys.
the class EpsgCoordinateSystemsLoader method loadUnitOfMeasure.
private void loadUnitOfMeasure() throws IOException {
final Map<Integer, Record> baseUnits = new TreeMap<>();
final Map<Integer, List<Record>> unitsByBase = new TreeMap<>();
try (final RecordReader reader = newReader("/public/epsg_unitofmeasure")) {
for (final Record record : reader) {
final int code = record.getInteger("uom_code");
final int baseUnitCode = record.getInteger("target_uom_code");
if (code == baseUnitCode) {
baseUnits.put(code, record);
} else {
Maps.addToList(unitsByBase, baseUnitCode, record);
}
}
}
try (ChannelWriter writer = newWriter("unitOfMeasure")) {
for (final Entry<Integer, Record> entry : baseUnits.entrySet()) {
final int code = entry.getKey();
final Record record = baseUnits.get(code);
loadUnitOfMeasure(unitsByBase, record, writer);
}
}
}
use of com.revolsys.io.channels.ChannelWriter in project com.revolsys.open by revolsys.
the class EpsgCoordinateSystemsLoader method loadCoordinateSystem.
private void loadCoordinateSystem() throws IOException {
try (final RecordReader reader = newReader("/public/epsg_coordinatesystem");
ChannelWriter writer = newWriter("coordinateSystem")) {
for (final Record record : reader) {
writeInt(writer, record, "coord_sys_code");
writeCodeByte(writer, record, "coord_sys_type", CoordinateSystemType.TYPE_NAMES);
writeDeprecated(writer, record);
}
}
}
Aggregations