Package nl.tudelft.simulation.dsol.animation.gis.mapfile

## Class MapFileXMLParser

- java.lang.Object
- - nl.tudelft.simulation.dsol.animation.gis.mapfile.MapFileXMLParser

    public final class MapFileXMLParser
    extends Object

This class parses an XML-mapfile that contains and constructs appropriate map objects.

Copyright (c) 2020-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.

The dsol-animation-gis project is based on the gisbeans project that has been part of DSOL since 2002, originally by Peter Jacobs and Paul Jacobs.

Author:
  Alexander Verbraeck

### Field Summary

Fields
`static URL` `MAPFILE_SCHEMA` the default mapfile.

### Method Summary

All Methods Static Methods Concrete Methods
`static GisMapInterface` `parseMapFile​(URL url)` parses a Mapfile URL to a mapFile.
`static GisMapInterface` `parseMapFile​(URL url, CoordinateTransform coordinateTransform)` parses a Mapfile URL to a mapFile.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MAPFILE_SCHEMA

    public static final URL MAPFILE_SCHEMA

the default mapfile.

### Method Detail

#### parseMapFile

    public static GisMapInterface parseMapFile​(URL url)
                                        throws IOException

parses a Mapfile URL to a mapFile.

Parameters:
  `url` - URL; the mapfile url.
Returns:
  MapInterface the parsed mapfile.
Throws:
  `IOException` - on failure

#### parseMapFile

    public static GisMapInterface parseMapFile​(URL url,
                                               CoordinateTransform coordinateTransform)
                                        throws IOException

parses a Mapfile URL to a mapFile.

Parameters:
  `url` - URL; the mapfile url.
  `coordinateTransform` - CoordinateTransform; the transformation of (x, y) coordinates to (x', y') coordinates.
Returns:
  MapInterface the parsed mapfile.
Throws:
  `IOException` - on failure