io module
Functions
| read(string | Array |
Takes a spatial data string or a URL to a file or zipped file and parses the spatial data into GeoJSON objects. Supported spatial data formats: KML, KMZ, GPX, GeoRSS, GML, spatial delimited files (CSV), GeoJSON. |
| write(azmaps, Spatial |
Writes GeoJSON object data as a geospatial XML string in the specified format. |
| write |
Writes GeoJSON object data to a geospatial XML file embedded in a compressed file. The spatial file in the zip file will be names 'doc' and will be assigned an appropriate file extension. Possibly file extensions include; xml, kml, json, csv, tsv, txt. |
Function Details
read(string | ArrayBuffer | Blob, SpatialDataReadOptions)
Takes a spatial data string or a URL to a file or zipped file and parses the spatial data into GeoJSON objects. Supported spatial data formats: KML, KMZ, GPX, GeoRSS, GML, spatial delimited files (CSV), GeoJSON.
function read(spatialData: string | ArrayBuffer | Blob, options?: SpatialDataReadOptions)
Parameters
- spatialData
-
string | ArrayBuffer | Blob
The spatial data string or URL to a file to read.
- options
- SpatialDataReadOptions
The read options.
Returns
Promise<SpatialDataSet>
write(azmaps, SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions)
Writes GeoJSON object data as a geospatial XML string in the specified format.
function write(data: azmaps, options?: SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions)
Parameters
- data
-
azmaps
The GeoJSON objects to retrieve shapes from, to write.
A set of options that customize how the XML is written.
Returns
Promise<string>
writeCompressed(azmaps, "Base64" | "Blob" | "ArrayBuffer", SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions)
Writes GeoJSON object data to a geospatial XML file embedded in a compressed file. The spatial file in the zip file will be names 'doc' and will be assigned an appropriate file extension. Possibly file extensions include; xml, kml, json, csv, tsv, txt.
function writeCompressed(data: azmaps, compressFormat?: "Base64" | "Blob" | "ArrayBuffer", options?: SpatialXmlWriteOptions & GmlWriteOptions & SpatialCsvWriteOptions)
Parameters
- data
-
azmaps
The GeoJSON objects to retrieve shapes from, to write.
- compressFormat
-
"Base64" | "Blob" | "ArrayBuffer"
The compressed file format to use. Options: Base64 (Data URI), Blob, or ArrayBuffer
A set of options that customize how the data is written.
Returns
Promise<string | ArrayBuffer | Blob>