[Rapc-commit] SF.net SVN: rapc: [60] trunk/rapc
Brought to you by:
maher_karim,
sdteffen
|
From: <mah...@us...> - 2007-03-22 07:07:26
|
Revision: 60
http://svn.sourceforge.net/rapc/?rev=60&view=rev
Author: maher_karim
Date: 2007-03-22 00:07:21 -0700 (Thu, 22 Mar 2007)
Log Message:
-----------
2007-03-22 Maher Abdel karim <mah...@do...>
* conf/rapc_ar.map
* conf/rapc_en.map:use tileindex for building layer.
* plugin/imageidentifyplugin.php:display the panel image.
Modified Paths:
--------------
trunk/rapc/changelog
trunk/rapc/conf/rapc_ar.map
trunk/rapc/conf/rapc_en.map
trunk/rapc/map.php
trunk/rapc/plugin/imageidentifyplugin.php
Modified: trunk/rapc/changelog
===================================================================
--- trunk/rapc/changelog 2007-03-18 13:28:05 UTC (rev 59)
+++ trunk/rapc/changelog 2007-03-22 07:07:21 UTC (rev 60)
@@ -1,3 +1,9 @@
+2007-03-22 Maher Abdel karim <mah...@do...>
+
+ * conf/rapc_ar.map
+ * conf/rapc_en.map:use tileindex for building layer.
+ * plugin/imageidentifyplugin.php:display the panel image.
+
2007-03-18 Maher Abdel karim <mah...@do...>
* script/create_view.sql:add panel.id to the view.
Modified: trunk/rapc/conf/rapc_ar.map
===================================================================
--- trunk/rapc/conf/rapc_ar.map 2007-03-18 13:28:05 UTC (rev 59)
+++ trunk/rapc/conf/rapc_ar.map 2007-03-22 07:07:21 UTC (rev 60)
@@ -1,6 +1,6 @@
-# MapFile created with Gix Export Tool - Thu Aug 31 11:43:58 2006
+# MapFile created with Gix Export Tool - Thu Aug 31 11:43:58 2006
# http://gix.sourceforge.net
-# View Date : 31 ��, 2006 08:16:18 �
+# View Date : 31 ??, 2006 08:16:18 ?
#
MAP
NAME 'View1'
@@ -88,7 +88,50 @@
COLOR 255 0 0
outline 24
END #QUERYMAP
-
+ LAYER #plot.shp
+ #TRANSPARENCY 100
+ NAME 'basemap'
+ METADATA
+ gix_layername "balqa.shp"
+ gix_layerfieldalias "plot_no"
+ END #METADATA
+ TOLERANCE 3
+ labelitem "plot_no"
+ TOLERANCEUNITS pixels
+ MAXSCALE 15000
+ TILEINDEX 'E:\gis_data\Mapping\dls_data\basemap.shp'
+ TILEITEM 'location'
+ # DATA 'E:\gis_data\Mapping\dls_data\balqa\balqa-basemap.shp'
+ HEADER 'header.html'
+ FOOTER 'footer.html'
+ LABELCACHE on
+# TILEINDEX ''
+# TILEITEM ''
+ STATUS on
+ DEBUG false
+ TRANSFORM true
+ TYPE polygon
+ CLASS
+ NAME 'basemap'
+ template "ttt_query.html"
+ #RASTERFILL_STYLE_SOLID
+
+ STYLE
+ OUTLINECOLOR 0 0 0
+ SIZE 1
+ COLOR 255 255 255
+ BACKGROUNDCOLOR 255 255 0
+ END #STYLE
+
+
+ label
+ color 0 0 0
+ position cc
+ end
+ END #CLASS
+
+ END #LAYER
+
LAYER #Adminsub.shp
TRANSPARENCY 100
NAME 'Adminsub'
Modified: trunk/rapc/conf/rapc_en.map
===================================================================
--- trunk/rapc/conf/rapc_en.map 2007-03-18 13:28:05 UTC (rev 59)
+++ trunk/rapc/conf/rapc_en.map 2007-03-22 07:07:21 UTC (rev 60)
@@ -5,15 +5,15 @@
MAP
NAME 'View1'
SIZE 550 400
- EXTENT 253216.66562500 200278.73750000 738982.64687500 718755.76250000
+ EXTENT 4988.104696 -187798.473479 658230.991626 325785.589348
UNITS meters
RESOLUTION 72
CONFIG PROJ_LIB 'C:/Proj/'
DATAPATTERN ''
TEMPLATEPATTERN ''
SHAPEPATH ''
- SYMBOLSET 'c:\program files\mpwh\rapc\etc\symbols.sym'
- FONTSET 'c:\program files\mpwh\rapc\etc\fonts.txt'
+ SYMBOLSET 'c:\program files\rapc\etc\symbols.sym'
+ FONTSET 'c:\program files\rapc\etc\fonts.txt'
STATUS on
IMAGECOLOR 255 255 255
IMAGETYPE png
@@ -24,14 +24,14 @@
MINSCALE 0
IMAGEPATH "/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
- LOG 'c:\program files\mpwh\rapc\conf\rapc_en.log'
+ LOG 'c:\program files\rapc\conf\rapc_en.log'
METADATA
END #METADATA
END #WEB
REFERENCE
- IMAGE 'c:\program files\mpwh\rapc\conf\rapc_en.jpg'
- EXTENT 253216.66562500 200278.73750000 738982.64687500 718755.76250000
+ IMAGE 'c:\program files\rapc\conf\rapc_en.jpg'
+ EXTENT 4988.104696 -187798.473479 658230.991626 325785.589348
STATUS on
COLOR -1 -1 -1
OUTLINECOLOR 255 255 0
@@ -93,12 +93,12 @@
TRANSPARENCY 100
NAME 'Adminsub'
METADATA
- gix_layername "Adminsub.shp"
+ gix_layername "Admin.shp"
END #METADATA
TOLERANCE 3
TOLERANCEUNITS pixels
- DATA 'e:\data\mpwh\adminsub\adminsub.shp'
+ DATA 'e:\data\admin.shp'
HEADER 'header.html'
FOOTER 'footer.html'
LABELCACHE on
@@ -125,8 +125,52 @@
END #CLASS
END #LAYER
+ LAYER #plot.shp
+ #TRANSPARENCY 100
+ NAME 'basemap'
+ METADATA
+ gix_layername "balqa.shp"
+ gix_layerfieldalias "plot_no"
+ END #METADATA
+ TOLERANCE 3
+ labelitem "plot_no"
+ TOLERANCEUNITS pixels
+ MAXSCALE 15000
+ TILEINDEX 'E:\gis_data\Mapping\dls_data\basemap.shp'
+ TILEITEM 'location'
+ # DATA 'E:\gis_data\Mapping\dls_data\balqa\balqa-basemap.shp'
+ HEADER 'header.html'
+ FOOTER 'footer.html'
+ LABELCACHE on
+# TILEINDEX ''
+# TILEITEM ''
+ STATUS on
+ DEBUG false
+ TRANSFORM true
+ TYPE polygon
+ CLASS
+ NAME 'basemap'
+ template "ttt_query.html"
+ #RASTERFILL_STYLE_SOLID
+
+ STYLE
+ OUTLINECOLOR 0 0 0
+ SIZE 1
+ COLOR 255 255 255
+ BACKGROUNDCOLOR 255 255 0
+ END #STYLE
+
+
+ label
+ color 0 0 0
+ position cc
+ end
+ END #CLASS
+ END #LAYER
+
+
LAYER #Borders.shp
TRANSPARENCY 100
NAME 'Borders.shp'
@@ -136,7 +180,7 @@
END #METADATA
TOLERANCE 3
TOLERANCEUNITS pixels
- DATA 'e:\data\mpwh\border\borders.shp'
+ DATA 'e:\data\border.shp'
HEADER 'header.html'
FOOTER 'footer.html'
LABELCACHE on
@@ -165,14 +209,14 @@
TRANSPARENCY 100
NAME 'Msroads'
METADATA
- "DESCRIPTION" "Msroads"
+ "DESCRIPTION" "Msroad"
"RESULT_FIELDS" "ID ROADNAME ROUTENAME ROADCLASS NODEFROM NODETO LENGTH MLENGTH"
gix_layerfieldalias "ID Roadname Routename Roadclass Nodefrom Nodeto Length Mlength"
END #METADATA
TOLERANCE 3
TOLERANCEUNITS pixels
labelitem "ROUTENAME"
- DATA 'e:\data\mpwh\msroads\msroads.shp'
+ DATA 'e:\data\msroad.shp'
HEADER 'header.html'
FOOTER 'footer.html'
LABELCACHE on
@@ -188,7 +232,7 @@
#PEN
STYLE
- SIZE 3
+ #SIZE 100
COLOR 68 81 196
END #STYLE
label
@@ -203,7 +247,7 @@
NAME 'Villages'
TOLERANCE 3
TOLERANCEUNITS pixels
- DATA 'e:\data\mpwh\village\villages.shp'
+ DATA 'e:\data\village.shp'
HEADER 'header.html'
FOOTER 'footer.html'
LABELCACHE on
@@ -289,27 +333,6 @@
TRANSPARENT on
END #OUTPUTFORMAT
- LAYER
- NAME "buffer"
-
-
- TYPE LINE
- STATUS OFF
- CLASS
- COLOR 255 0 0
- END
-END # layer
-
-
-LAYER
- NAME "nobuffer"
-
- TYPE LINE
- STATUS OFF
- CLASS
- COLOR 0 255 0
- END
-END # layer
-
+
END #MAP
Modified: trunk/rapc/map.php
===================================================================
--- trunk/rapc/map.php 2007-03-18 13:28:05 UTC (rev 59)
+++ trunk/rapc/map.php 2007-03-22 07:07:21 UTC (rev 60)
@@ -99,13 +99,13 @@
}
if (($_POST['Frompoint']!=0)&&($_POST['Topoint']!=0)){
- $strQueryDistance = "select distance(p2,(select the_geom as p from panel
- where id=".$_POST['Frompoint'].")) from
+ $strQueryDistance = "select distance(p2,(select the_geom as p from panel
+ where id=".$_POST['Frompoint'].")) from
(select the_geom as p2 from panel where id=".$_POST['Topoint'].") as d";
$objResult = pg_query($strQueryDistance);
if(($objResult)&&(pg_numrows($objResult) > 0)) {
$arrRow = pg_fetch_row($objResult, 0);
-
+
$distance=$arrRow[0];
//pass the id of the selected Point.
?><script> document.forms["mapform"].distance.value=1;
@@ -134,13 +134,13 @@
// print_r(str_replace(" ","+",$_REQUEST['searchvalue']));
//$objLayer->setFilter($_REQUEST['searchvalue']);
//print_r($objLayer->getNumResults());
-
+
$strExp="([VILL_NO]=".$_REQUEST['vill_no']." and [BLOCK_NO]=".$_REQUEST['block']." AND [".$_REQUEST['fieldname']."]=".$_REQUEST['plot'].")";
if ($_REQUEST['block']!=0){
if (@$objLayer->queryByAttributes('VILL_NO',$strExp,MS_SINGLE) ==MS_SUCCESS) {
-
+
$ResultCount=$objLayer->getNumResults();
-
+
$gbShowQueryResults = TRUE;
for ($i=0; $i < $ResultCount; $i++) {
$QueryResult=$objLayer->getResult($i);
@@ -153,27 +153,27 @@
$objLayer->close();
$gpoMap->setextent($oExtents->minx-10,$oExtents->miny-10,$oExtents->maxx+10,$oExtents->maxy+10);
}
-
-
+
+
$objImage=$gpoMap->draw();
$_REQUEST['action']='';
}
-
+
} else {
$strMessages = $strMessages._(("Nothing found"));
}
break;
-
-
+
+
case "search":
// $objLayer = $gpoMap->getlayerbyname($_POST[layer][0]);
$objLayer = $gpoMap->getlayerbyname('Msroads');
// print_r(str_replace(" ","+",$_REQUEST['searchvalue']));
-
+
if ($objLayer->queryByAttributes('ROUTENAME',str_replace(" ","+",$_REQUEST['searchvalue']),MS_SINGLE) ==MS_SUCCESS) {
-
+
$ResultCount=$objLayer->getNumResults();
-
+
$gbShowQueryResults = TRUE;
for ($i=0; $i < $ResultCount; $i++) {
$QueryResult=$objLayer->getResult($i);
@@ -183,27 +183,28 @@
//$newbuffered = $Shape->buffer(20);
// print_r ($Shape->values);
//print_r('Maher');
-
+
$oExtents=$Shape->bounds;
//print_r($oExtents);
$objLayer->close();
$gpoMap->setextent($oExtents->minx-10,$oExtents->miny-10,$oExtents->maxx+10,$oExtents->maxy+10);
}
-$layer2 = $gpoMap->getLayerByName('nobuffer');
+/*$layer2 = $gpoMap->getLayerByName('nobuffer');
$layer2->set("status", MS_ON);
$layer2->addFeature($Shape);
$buffered_shape = $Shape->buffer(200);
$layer = $gpoMap->getLayerByName('buffer');
$layer->set("status", MS_ON);
-//print_r($buffered_shape);
-//$layer->addFeature($buffered_shape);
-
-
+print_r($buffered_shape);
+$layer->addFeature($buffered_shape);
+*/
+
+
$objImage=$gpoMap->draw();
-
+
} else {
$strMessages = $strMessages._(("Not working"));
}
@@ -215,7 +216,7 @@
"<a href=\"panelpage.php?action=edit&id=".$PointID.
"\">#".$PointID."</a>");
}
-
+
break;
case "acceptypointlocation" :
@@ -252,7 +253,7 @@
/**
* Log the old DeliveryPoint coordinates in the History table.
*/
-
+
//start checking of deliverypoint values
$objPoint = DB_DataObject::factory('public.panel');
if(PEAR::isError($objPoint)or(NULL == $objPoint)) {
@@ -264,7 +265,7 @@
if ($objPoint->count() > 0) {
//Store original deliverypoint geocode value.
$originalid = $objPoint->id;
-
+
} else {
echo _("NO geocode value returned");
}
@@ -274,11 +275,11 @@
$strQuery = 'BEGINS; ';
$strUpdatePoint = " update panel set the_geom=GeometryFromText('POINT(".
$_REQUEST["PointX"]." ".$_REQUEST["PointY"].")', -1) where id=".$PointID;
-
+
pg_query($strUpdatePoint);
-
+
/**
* \todo Check the query result.
*/
@@ -460,7 +461,7 @@
function distance(){
if (document.forms["mapform"].Frompoint.value != 0 &&
document.forms["mapform"].Topoint.value !=0){
-
+
}
}
</script>
@@ -600,7 +601,7 @@
<option value="394079,485975,575783,568638">Zarqa</option>
<option value="363277,569659,414272,625700">Irbed</option>
-
+
</select><br />
<SELECT name="MapSize" onChange="MapSizeSelected()" title="<?= _("Select the map size from the list.") ?>">
<OPTION><?= _("Map Size")?></OPTION>
@@ -626,7 +627,7 @@
</tr>
<tr><td>
-
+
<table>
<tr><td>
<?= _("From Point:")?><input size="5" type="text" maxlength="5" name="Frompoint" value="" length="5">
Modified: trunk/rapc/plugin/imageidentifyplugin.php
===================================================================
--- trunk/rapc/plugin/imageidentifyplugin.php 2007-03-18 13:28:05 UTC (rev 59)
+++ trunk/rapc/plugin/imageidentifyplugin.php 2007-03-22 07:07:21 UTC (rev 60)
@@ -118,11 +118,11 @@
$this->objLayer->open();
$objShape = $this->objLayer->getShape(0,$Risultato);
$arrValues = $objShape->values;
-
+
$strValue = $arrValues[$this->arrConfiguration['Field']];
$strImageLocation = sprintf($this->arrConfiguration['ImageLocation'],
$strValue);
-
+
if(!is_dir($strImageLocation)) continue;
if($handle = opendir($strImageLocation)) {
while(false !== ($strFile = readdir($handle))) {
@@ -140,7 +140,10 @@
}
$objTable->addRow(array('<a href="'.
sprintf($this->arrConfiguration['ImageLocationURL'], $strValue).
- $strFile.'">'.$strFile.'</a> ', $strValue));
+ $strFile.'">'.$strFile.'</a> ', $strValue,'<image src="'.
+ sprintf($this->arrConfiguration['ImageLocationURL'], $strValue).
+ $strFile.'" width=100 height=100 />'));
+
}
}
closedir($handle);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|