The 'Export Geographic Data' tool currently cannot export splines at all.
A very simple tweak would make it possible to at least export them as polylines.
Description
Description
Details
Details
- Severity
- Tweak
- Resolution
- Open
- Reproducibility
- N/A
- Operating System
- Windows 7
- Category
- General
Additional Information
SCR_ExportGeoJSONTool.c, line 462:
GeoShapeType shapeType = GeoShapeType.UNKNOWN; if (classname == SCR_GeoExporter.POLYLINE_SHAPE_ENTITY) { if (isClosed) shapeType = GeoShapeType.POLYGON; else shapeType = GeoShapeType.POLYLINE; }
This code sets the shape type from UNKNOWN to POLYLINE / POLYGON, if the shape is a polyline. If the shape however is a spline, it will remain UNKNOWN and consequently, an the entry is not exported.
Instead, the surrounding if statement should be changed to this, or removed completely (since a previous if already checks this):
if (classname == SCR_GeoExporter.POLYLINE_SHAPE_ENTITY || classname == SCR_GeoExporter.SPLINE_SHAPE_ENTITY)
This simple change would allow modders to export their splines as polylines, which is usually close enough and always better than nothing.
Optionally, a warning about this could be added.
if (classname == SCR_GeoExporter.SPLINE_SHAPE_ENTITY) Print("Exporting spline shape as polyline!", LogLevel.WARNING);