Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want the MapCooker sample to generate tiles with a projected spatial reference of GCS WGS 1984. I currently initialize it with a path to a layer with the NAD_1983_HARN_Adj_MN_Isanti_Feet coordinate system. The sample is here:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Multithreaded_MapCruncher/000100000mmm000000/

I already modified the sample to produce .pngs, by changing the StorageFormat to

cacheStorageInfo.StorageFormat = esriMapCacheStorageFormat.esriMapCacheStorageModeExploded; 

Now I want to control the projected .pngs spatial reference. Any idea how to do this? I've been messing around with it for 2 hours with no luck.

I'm using ArcEngine 10 with C# and VS2010

share|improve this question
1  
Did you try setting the spatialreference of the map (i.e. dataframe) in the mxd to WGS 84? Not sure, but you might need to set a geotransformation too. –  Kirk Kuykendall Dec 15 '10 at 17:38

1 Answer 1

up vote 1 down vote accepted

I played around with projections quite a bit and then I tried something obvious and it worked.

Load the target file. Then change the function: IMap GetMapFromDocument(string mapDocFullPath)

To this:

IMap GetMapFromDocument()
{
    IMap map = YourMapThatHasTargetLayerLoaded.activeView as IMap; 
    return map; 
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.