The map, trees, water, rocks, and all of that is the geometry of the map, and can be edited in Google Sketchup or another similar 3D model editor. However, you NEED Alias Maya 5, 6, 6.5 or 7, or Autodesk 3DS Max, as well as a few other Nintendo NITRO SDK tools to convert it to a format the DS can read.
You add the polygons that represent rocks, trees, grass, ledges, etc etc, that get textured later on.
You export them using SDSME, then convert them to OBJ files. There's a version of MKDS Track Editor that does that, but I'm not sure if it's public or not. From there, you just edit it in a 3D model editor of your choice.