.set_country(+)
Description
Set the destination country of the to be generated GIS files by the GeometryRoutedServicesWriter
.
This country name is used to determine the best possible coordinate reference system (projection) to use for the
geometry information of the outputs.
If the country is not set by the user, the choice for the destination coordinate reference system is based on the coordinate reference system of the source network that is to be persisted. This is likely sufficient in most cases, but sometimes a country specific projection is required in which case the country can be provided here.
Whenever a country name is to be supplied, make sure this name complies with the ISO 3166 standard ( see for example https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes ).
Signature
.set_country(country_name: str)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
country_name |
str |
None |
Context dependent | The destination country name (ISO 3166) |
Return type
N/A
Example 1
from planit import *
planit = Planit()
# converter
converter = planit.converter_factory.create(ConverterType.INTERMODAL)
# PLANit reader
planit_reader = converter.create_reader(IntermodalReaderType.PLANIT, AUSTRALIA)
planit_reader.settings.set_input_directory(PLANIT_INPUT_PATH)
# GeoIo (GIS geometry shape) writer
geo_writer = converter.create_writer(IntermodalWriterType.SHAPE)
geo_writer.settings.routed_services_settings.set_output_directory(OUTPUT_PATH)
geo_writer.settings.routed_services_settings.set_country("Australia")
# perform conversion
converter.convert(planit_reader, geo_writer)
See also
N/A
Source code
Class GeometryRoutedServicesWriterSettingsWrapper
in converterwrappers.py