Product: IESX

Version: GeoFrame 3.7

Application: BasemapPlus

Search Type: HowTo


Topic:
How to transfer cartography between GeoFrame projects.

Description:
What to do if you have cartographic data(loaded or user-defined in Basemap) in one project and you want to transfer it to another project to display on Basemap. In short, there is no direct way of doing this. But below are steps export and import via CPS-3/IESX.


Solution:
The general approach is: 1.) Save an IESX basemap with just the culture data. 2.) Export this basemap to CPS using the CPS-3 IESX Link. 3.) Export the CPS map to an ASCII file. 4.) Reformat the exported CPS ASCII file and load into IESX. 1.) Save an IESX basemap with the just culture data: a. In Basemap > Post, turn off all the surveys and post the cartographic data you want to export. b. In File> Save as, save this map to a new name. 2.) Export this basemap to CPS using the CPS-3 IESX Link: From either the Application Manager > CPS3 > IESX link or IESX Session Manager > CPS-3 IESX Link, select IESX->CPS3, then select Cartography. Select the map with cartography, select the 'Add' button, then select 'Apply'. 3.) Export the CPS map as an ASCII file: a. Display the map you just imported from IESX. Not necessary but you want to make sure it display correctly. Display > Basemap, select Map Set > Pick Sets, select the cartographic map, select 'OK', then 'OK' in the Main Module. b. To export, select File > Export> ASCII > Map, input the directory and output file name, select 'OK'. In the next menu, just use the defaults and select 'OK'. 4.) Reformat the exported CPS ASCII file: Below is a perl script that can be used to reformat the file in order to load into IESX as user-defined cartography either through Basemap or IESX DataManager. This is an unsupported script. #!/home/weasel/util/apps/perl/perl ################################################################### # # cps2udf.pl - written by Scott King, GeoQuest Calgary # modified by Tom Cox, GeoQuest Calgary # - Converts all layers in the file by their CPS number # ################################################################### # usage: cps2udf.pl cpsfilename > outputfile # where: # cpsfilename is the name of the data file exported from CPS-3 # outputfile is the name of the output data file ################################################################### # Use the following user defined format when loading the resultant # data into basemap: # # read nrec(1) # ; # line if rec(1) col(1) len(1) is(l) # line read n(0) # line layer rec(1) col(3) len(12) # line ptflag rec(2) col(1) len(3) is(eos) # ; # line ptrecords n(1) # line x1 rec(2) col(3) end(15) dec(2) # line y1 rec(2) col(15) end(30) dec(2) # ; # text if rec(1) col(1) len(1) is(t) # text read n(2) # text layer rec(1) col(3) len(12) # text xlocation rec(2) col(3) end(15) dec(2) # text ylocation rec(2) col(15) end(30) dec(2) # text value rec(3) col(1) end(49) # text skip n(1) # ################################################################### # Use the following procedure to extract user layers from basemap: # # 1) transfer the map to cps using IESX/CPS link # 2) Export the data set to an ASCII file # (use CPS-3 format, ordered input/output) # 3) run this script # 4) you may want to edit the layernames in the file from numbers # to names you will recognize later # 5) load into basemap using the above format #################################################################### # get the current time and date ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $mon=$mon+1; $wday=$wday+1; $year=$year+1900; # get the name of this program $myname=$0; @tmp=split(/\//,$myname); $ln=@tmp; $myname=@tmp[$ln-1]; $INFILE=$ARGV[0]; open(INFILE); $inblock=0; while () { if (substr($_,0,2) eq "->" && $inblock == 1 ) { printf"eos\n"; $inblock=0; } if (substr($_,0,2) eq "->" && $inblock == 0 && substr($_,3,11) eq "Poly(Layer ") { $input=substr($_,8,24); @tmp=split(":",$input); $tmp[0]=~s/\)//g; $LAYERNAME = $tmp[0]; printf"l %-30s\n",$LAYERNAME; } if (substr($_,49,4) eq " 28.") { $inblock=1; $x=substr($_,0,15); $y=substr($_,16,15); printf"%12.2f %12.2f\n",$x,$y; } if ($inblock == 1 && substr($_,49,4) eq " -1.") { printf"eos\n"; printf"l %-30s\n",$LAYERNAME; } if (substr($_,0,2) eq "->" && $inblock == 0 && substr($_,3,11) eq "Text(Layer ") { $input=substr($_,8,14); @tmp=split(":",$input); $tmp[0]=~s/\)//g; $LAYERNAME = $tmp[0]; $intext=1; } if ($intext == 1 && substr($_,49,4) eq " 50.") { $x=substr($_,0,15); $y=substr($_,16,15); } if ($intext == 1 && substr($_,49,4) eq "") { $string = substr($_,0,50); printf"t %-30s\n",$LAYERNAME; printf"%12.2f %12.2f\n",$x,$y; printf"%-50s\n",$string; } } if ($inblock == 1 ) { printf"eos\n"; } ################################################################### # E N D ###################################################################

Last Modified on: 26-MAY-00