And how are you planning to acquire the data sets/data for terrain mapping?
Image mapping you can get the size shape of a building road.... at a specific altitude using google earth & compare it's accuracy or flaws compared to buildings roads on your own territory if you collect enough data then you can write an algorithm!
And even if google earth and other mapping tech didn't exist using covert methods by sending micro UAV's to take images at specific altitudes will allows you to map specific routs to specific locations!
Most of all INS tech in terms of building more accurate measuring devices, timing devices, compasses, faster processing and more memory storage devices.... allows for far more advanced Internal Navigation Systems that will allow you to fly Cruise Missiles to an accuracy of a few hundred meters of a target & that's when your terrain and imaging sensors come into play!
Right now imaging software can recognize faces on small simple devices which means a pictures of known Saudi, Israeli, & US Aircraft Bunker & it's layout can easily be detected and targeted
Also using the same method you can better correct your route by calculating your turns at area where you have UAV or sat images to use to compare them too
When it comes to Cruise Missiles for Iran Targeting of known fixed sites like Airbases, refineries, power plants, ports,.... IS NOT A PROBLEM the main problem is finding a safe path to get there! Cruise Missiles are fairly easy to target if they are NOT placed on a safe route or if your route is compromised!
Iran is also fully capable of sending imaging sat with a short lifespan into space!
Also, covert methods using airlines to map routes for terrain mapping is used by many countries although limited, but I'm sure before Iran did that before they had the capability to send sat's up today distance measuring devices & imaging sats with limited life span is as easy as pie for Iran!