Refactor to use SpatialDataType instead of FileType