shapefile_loader.php File Reference


Variables

 $strPathInDcmms = '../'
 $dcmPage = new DcmPage(basename(__FILE__))
$dcmPage strPathInDcmms = '../'
 $strMessage = ""
 $boolShowForm = true
 $_SESSION ['strPgClientBinDirectory']
 $boolShowForm = false
 $intMaxMemory = (int) str_replace('M', '000000', get_cfg_var('memory_limit'))
 $intMaxFileSize
 $zip = zip_open($shpdir.$_FILES["userfile"]["name"])
 exit
 exit
 $dirhandle = opendir($shpdir)
 $strFileName = str_replace( ".shp", "", strtolower($filename))
 $strTableName = $strFileName
 $arrDropViews = file("../script/drop_views.sql")
 $strQuery = ""
 $arrCommands
 $blnSuccess = false
 break
 $arrCreateViews = file("../script/create_views.sql")
 $strQuery = ""
 $arrTranslationPostfix = array('name')
< p ><?=_("Done.")?></p ><
?php}?>< h2 ><?=sprintf(_("Loadshapefilesto%s"), $_SESSION["strDataBase"])?></h2 ><
pclass="important"><?=$strMessage?><
/p >< formenctype="multipart/form-data"action=<?=$pagename?> 
method

Variable Documentation

$_SESSION['strPgClientBinDirectory']
 

Initial value:

 
   trim($_SESSION['strPgClientBinDirectory'])
Todo:
Store full shp2pgsql path to ensure OS independence.

$arrCommands
 

Initial value:

 array("set PGCLIENTENCODING=".
        $_SESSION["strShapefileEncoding"]."& \"".$_SESSION["strPgClientBinDirectory"].
        "shp2pgsql.exe\" -d \"$shpdir\\$filename\" -D $strTableName ".
        $_SESSION["strDataBase"].
        " > \"$shpdir\\$filename.sql\" 2>\"$shpdir\\error.log\"" => 0,
        "set PGCLIENTENCODING=".
        $_SESSION["strShapefileEncoding"]."& set PGPASSWORD=".
        $_SESSION["Password"].
        "& \"".$_SESSION["strPgClientBinDirectory"]."psql.exe\" -d ".
        $_SESSION["strDataBase"]." -U ".$_SESSION["UserName"].
        " -h localhost -f \"$shpdir\\$filename.sql\" ".
        "2> \"$shpdir\\error.log\"" => 0)

$arrCreateViews = file("../script/create_views.sql")
 

$arrDropViews = file("../script/drop_views.sql")
 

$arrTranslationPostfix = array('name')
 

Update Translation table.

$blnSuccess = false
 

$boolShowForm = false
 

$boolShowForm = true
 

$dcmPage = new DcmPage(basename(__FILE__))
 

$dirhandle = opendir($shpdir)
 

$intMaxFileSize
 

Initial value:

 min((int) str_replace('M', '000000', 
  get_cfg_var('upload_max_filesize')), (int) str_replace('M', '000000',
  get_cfg_var('post_max_size')))

$intMaxMemory = (int) str_replace('M', '000000', get_cfg_var('memory_limit'))
 

Determine maximum file size and memory usage.

$strFileName = str_replace( ".shp", "", strtolower($filename))
 

$strMessage = ""
 

$strPathInDcmms = '../'
 

Todo:
Check create_views.sql/drop_views.sql

$strQuery = ""
 

$strQuery = ""
 

$strTableName = $strFileName
 

$zip = zip_open($shpdir.$_FILES["userfile"]["name"])
 

break
 

exit
 

exit
 

<p><?=_("Done.")?></p><?php}?><h2><?=sprintf(_("Loadshapefilesto%s"),$_SESSION["strDataBase"])?></h2><pclass="important"><?=$strMessage?></p><formenctype="multipart/form-data"action=<?=$pagename?> method
 

Initial value:

"POST">
    <p><?= _('Please zip your shapefiles before loading. Upload the zipfile.').
      sprintf(_('The maximum zipfile size is %d MB.'), $intMaxFileSize/1000000)
      ?></p>
     <table summary="file upload form">
     <tr><td class="label">
    <input type="hidden" name="MAX_FILE_SIZE" value="<?= $intMaxFileSize ?>">
    <?= _("Load this file:")?></td><td class="input"><input name="userfile" 
      type="file"></td></tr> <?php
    $dcmPage->printTextInput("Table", $_POST, "", 
      _("The name of the geodatabase table to which the data will be loaded."))
Todo:
Cleanup files

$dcmPage strPathInDcmms = '../'
 


Generated on Sat Jul 1 21:19:26 2006 for DCMMS by  doxygen 1.4.6-NO