org.citygml4j.builder.cityjson.json.io.writer.CityJSONChunkWriter Java Examples
The following examples show how to use
org.citygml4j.builder.cityjson.json.io.writer.CityJSONChunkWriter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CityJSONWriter.java From web-feature-service with Apache License 2.0 | 6 votes |
public CityJSONWriter(CityJSONChunkWriter writer, GeometryStripper geometryStripper, UIDCacheManager uidCacheManager, Object eventChannel, Config config) { this.writer = writer; this.geometryStripper = geometryStripper; this.uidCacheManager = uidCacheManager; this.config = config; marshaller = writer.getCityJSONMarshaller(); int queueSize = config.getProject().getExporter().getResources().getThreadPool().getDefaultPool().getMaxThreads() * 2; writerPool = new SingleWorkerPool<AbstractCityObjectType>( "cityjson_writer_pool", new CityJSONWriterWorkerFactory(writer, ObjectRegistry.getInstance().getEventDispatcher()), queueSize, false); writerPool.setEventSource(eventChannel); writerPool.prestartCoreWorkers(); }
Example #2
Source File: CityJSONWriterBuilder.java From web-feature-service with Apache License 2.0 | 5 votes |
@Override public FeatureWriter buildFeatureWriter(OutputStream stream, String encoding) throws FeatureWriteException { try { CityJSONChunkWriter writer = factory.createCityJSONChunkWriter(stream, encoding); writer.setMetadata(metadata); if ("true".equals(formatOptions.get(PRETTY_PRINT))) writer.setIndent(" "); return new CityJSONWriter(writer, geometryStripper, uidCacheManager, eventChannel, config); } catch (CityJSONWriteException e) { throw new FeatureWriteException("Failed to create CityJSON response writer.", e); } }
Example #3
Source File: CityJSONWriterWorkerFactory.java From importer-exporter with Apache License 2.0 | 4 votes |
public CityJSONWriterWorkerFactory(CityJSONChunkWriter writer, EventDispatcher eventDispatcher) { this.writer = writer; this.eventDispatcher = eventDispatcher; }
Example #4
Source File: CityJSONWriterWorker.java From importer-exporter with Apache License 2.0 | 4 votes |
public CityJSONWriterWorker(CityJSONChunkWriter writer, EventDispatcher eventDispatcher) { this.writer = writer; this.eventDispatcher = eventDispatcher; }