# Indoor map with relative coordinates

I am trying to create an indoor map with relative coordinates where the bottom left hand corner of the map is (0, 0), and the CRS is UTM, so the distance between coordinates is in meters.

Previously I have made indoor maps a little differently. I just created a new shapefile layer with a 'Pseudo Mercator' CRS, then I import an image of a building floor plan and used the 'add feature' function to trace vectors on top of the image. I would then export that layer as KML and use it with OpenLayers.

A new requirement means that I have to make indoor maps with relative (I'm not even sure what relative means here) UTM coordinates where the bottom left of the map is (0, 0).

Can anyone give me advice on how to approach this?

Instead of UTM, use a custom transverse mercator projection on an arbitrary point:

``````+proj=tmerc +lat_0=51.4 +lon_0=7 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
``````

the lat_0 and lon_0 point to the bottom left point of your coordinate system.

The KML needs a CRS in degrees, so you may convert the data into WGS84 to show it on OpenLayers.

You need to play with false northing/easting, leaving the UTM parameters otherwise intact. If the bottom left corner is `(5000,10000)` in the corresponding UTM (in meters), just subtract `5000` from false easting and `10000` from the current false northing.

UTM uses false easting of 500 000 m by default (and a false northing of 10 000 000 m on the south hemisphere), but this is not reflected in the Proj4 CRS definition format; you'll need to add the options `+x_0=` (easting) and `+y_0=` (northing) yourself, like this:

``````+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs +x_0=-5000 +y_0=-10000
``````

I'm not sure whether this adds to the implicit UTM false northing/easting (as this example expects) or replaces them, in which case you would need to subtract your values from the default ones.

However, as AndreJ pointed out, I'm not sure about the compatibility of such a custom CRS with KML and OpenLayers.