<commit_before><?php 
/* Draw a bunch of reference maps */

$map = ms_newMapObj("$rootpath/data/gis/base4326.map");
$map->set("width", 320);
$map->set("height", 240);
$lat0 = $metadata["lat"];
$lon0 = $metadata["lon"];
$map->setextent($lon0 - 5,$lat0 - 5,$lon0 + 5,$lat0 + 5);

$namer = $map->getlayerbyname("namerica");
$namer->set("status", 1);
$lakes = $map->getlayerbyname("lakes");
$lakes->set("status", 1);

$stlayer = $map->getlayerbyname("states");
$stlayer->set("status", 1);

$img = $map->prepareImage();
$namer->draw($img);
$lakes->draw($img);
$stlayer->draw($img);

$lyr = ms_newLayerObj($map);
$lyr->set("type", MS_SHAPE_POINT);
$lyr->set("status", MS_ON);
$lyr->set("labelcache", MS_ON);

$lyr_c0 = ms_newClassObj($lyr);
$lyr_c0s0 = ms_newStyleObj($lyr_c0);
$lyr_c0s0->set("symbolname", "circle");
$lyr_c0s0->set("size", 10);
$lyr_c0s0->color->setRGB(0,0,0);
$lyr_c0s1 = ms_newStyleObj($lyr_c0);
$lyr_c0s1->set("symbolname", "circle");
$lyr_c0s1->set("size", 6);
$lyr_c0s1->color->setRGB(255,0,0);

$lyr_c0->label->set("buffer", 20);
$lyr_c0->label->set("type", MS_BITMAP);
$lyr_c0->label->set("size", MS_GIANT);
$lyr_c0->label->set("position", MS_AUTO);
$lyr_c0->label->color->setRGB(255,255,255);
$lyr_c0->label->outlinecolor->setRGB(0,0,0);
$logopt = ms_newpointobj();
$logopt->setXY($lon0, $lat0);
$logopt->draw($map, $lyr, $img, 0, $metadata["city"]);
$logopt->free();

$map->drawLabelCache($img);

$url = $img->saveWebImage();

?><img src="<?php echo $url; ?>"><commit_msg>get rid of error with the use of city<commit_after><?php 
/* Draw a bunch of reference maps */

$map = ms_newMapObj("$rootpath/data/gis/base4326.map");
$map->set("width", 320);
$map->set("height", 240);
$lat0 = $metadata["lat"];
$lon0 = $metadata["lon"];
$map->setextent($lon0 - 5,$lat0 - 5,$lon0 + 5,$lat0 + 5);

$namer = $map->getlayerbyname("namerica");
$namer->set("status", 1);
$lakes = $map->getlayerbyname("lakes");
$lakes->set("status", 1);

$stlayer = $map->getlayerbyname("states");
$stlayer->set("status", 1);

$img = $map->prepareImage();
$namer->draw($img);
$lakes->draw($img);
$stlayer->draw($img);

$lyr = ms_newLayerObj($map);
$lyr->set("type", MS_SHAPE_POINT);
$lyr->set("status", MS_ON);
$lyr->set("labelcache", MS_ON);

$lyr_c0 = ms_newClassObj($lyr);
$lyr_c0s0 = ms_newStyleObj($lyr_c0);
$lyr_c0s0->set("symbolname", "circle");
$lyr_c0s0->set("size", 10);
$lyr_c0s0->color->setRGB(0,0,0);
$lyr_c0s1 = ms_newStyleObj($lyr_c0);
$lyr_c0s1->set("symbolname", "circle");
$lyr_c0s1->set("size", 6);
$lyr_c0s1->color->setRGB(255,0,0);

$lyr_c0->label->set("buffer", 20);
$lyr_c0->label->set("type", MS_BITMAP);
$lyr_c0->label->set("size", MS_GIANT);
$lyr_c0->label->set("position", MS_AUTO);
$lyr_c0->label->color->setRGB(255,255,255);
$lyr_c0->label->outlinecolor->setRGB(0,0,0);
$logopt = ms_newpointobj();
$logopt->setXY($lon0, $lat0);
$logopt->draw($map, $lyr, $img, 0, $metadata["name"]);
$logopt->free();

$map->drawLabelCache($img);

$url = $img->saveWebImage();

?><img src="<?php echo $url; ?>">
{'fraction_non_alphanumeric': 0.26777408637873756, 'fraction_numerical': 0.0504983388704319, 'mean_word_length': 7.578347578347579, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1431289', 'n_tokens_mistral': 1414, 'n_tokens_neox': 1367, 'n_words': 188}