Import fire hydrants from a CSV or JSON file

Add hundreds of GTA V hydrants at once from the Fire MDT or Community admin, using a CSV, a JSON file or a resource config vector3 list.

If your server already has its hydrants listed somewhere, in a resource config, a spreadsheet or a JSON dump from a map tool, you can add them all to the hydrant registry in one go instead of pinning each one with Pick on map. The registry is the same one wherever you open it: the Fire MDT, the live map and dispatch all read it.

Who can import

Community admins, supervisors and dispatchers. A community admin does not need to be in a fire department to do it. Anyone else who opens the import panel is told that, and can still read the registry and export it.

Where to import

  • In the Community admin panel, open Fire and EMS in the sidebar and stay on the Hydrants tab. This is the place to start if you are setting up the server and are not on a fire roster.
  • In the Fire MDT, go to Hydrants.

Both open the same import panel, and both lists show the result as soon as it is saved.

Import a file

  1. Open Hydrants in the Community admin panel or the Fire MDT.
  2. Press Import. A panel opens on the right.
  3. Press Choose a file, or paste the contents into the box under it.
  4. Read the preview. It counts the hydrants it will add, lists the duplicates it found and the rows it cannot use, each with its row number and the reason.
  5. If some hydrants are already in your registry, pick Skip them or Update them.
  6. Press Import. The result shows in the same panel, and the new hydrants appear in the registry and on the live map straight away, for everyone who has them open.

Nothing is saved until you press Import, and the server reads the file again before it saves, against the registry as it is at that moment.

Formats it reads

A CSV with a header row. Header names can be in any case, and these spellings work:

  • id, hydrantId or name for the hydrant ID
  • x and y for the GTA coordinates, and a z column is ignored
  • address, postal, size, type (public or private), status and notes
  • flow, flowRate or gpm for the flow in gallons per minute
  • color or colorCode for the cap color: blue, green, orange, red or other
id,x,y,z,address,gpm
HYD-0001,215.4,-810.2,29.1,Power St,1500
,-1037.8,-2737.6,13.9,New Empire Way,750

A file saved from Excel with semicolons and decimal commas reads too, and so does a plain list of x, y, z lines with no header.

A JSON list, or an object with a hydrants list. Each entry can be an object with x and y, an object with coords, an [x, y, z] array, or a vector3 string:

{"hydrants": [
  {"x": 215.4, "y": -810.2, "z": 29.1},
  {"name": "HYD-0002", "coords": {"x": -1037.8, "y": -2737.6, "z": 13.9}},
  [123.4, -567.8, 29.1],
  "vector3(450.0, -990.0, 30.7)"
]}

The vector3 list from a resource config, pasted as it is. Each vector3(...) or vec3(...) is one hydrant, and the lines around them are ignored:

Config.Hydrants = {
    vector3(123.4, -567.8, 29.1),
    vector3(-1037.8, -2737.6, 13.9),
}

Press Download template in the panel for a CSV with every column filled in.

What happens to each row

  • A row without an ID is numbered for you, carrying on from the highest HYD- number your registry already has.
  • A row without a color takes the color of its flow: blue from 1500 GPM, green from 500, orange from 250, red under 250.
  • A row whose coordinates are not numbers, or fall outside the live map, is not imported. The preview names the row and the value.
  • A row with an ID and no coordinates is kept without a pin, the same as a hydrant added by hand without one.

Duplicates

A row is a duplicate when it has the same hydrant ID as one in your registry, or sits within 2 units of one. Skip them leaves the stored hydrants alone. Update them writes the file's values onto the stored hydrant and keeps its ID. A blank cell leaves that field as it is, so a file with only id,x,y moves pins without clearing addresses.

Two rows in the same file with the same ID or within 2 units of each other are a mistake in the file, so the first is used and the second is skipped.

Limits

Up to 5000 hydrants, and 2 MB of text, in one file. Split a larger list and import each part; the second part finds anything already added as a duplicate.

Export

Export downloads your registry as a CSV in the same columns the import reads. It is beside Import in both places. Edit it in a spreadsheet and import it with Update them to change many hydrants at once. A private hydrant's business is not in the export and is left as it is on import.

Undo a bad import

In the Community admin panel, under Fire and EMS and Hydrants:

  • Tick the rows you want gone and press Delete selected.
  • Press Delete all to empty the registry. To confirm, you type delete and the number of hydrants, such as delete 152 hydrants, so it cannot happen by accident.

A deletion cannot be undone, so press Export first if you might want the hydrants back. Every screen with the registry open drops them straight away.

To change one hydrant, press the menu at the end of its row and choose Edit. To place its pin by clicking the map, use Pick on map in the Fire MDT.

Building pre-plans import the same way, from the Pre-plans tab beside Hydrants, and a pre-plan can name one of your hydrants by its ID. See Import building pre-plans from a CSV or JSON file. Import the hydrants first, so the pre-plans can find them.

When a file will not read

The preview names the problem for the whole file, such as JSON with a missing bracket or a header row with no column it knows. If it still will not import and you cannot see why, open a support ticket and attach the file.

Still stuck? Open a ticket and the support team will answer it.