We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba
and winbind
to properly work.
So, if not installed, install them:
sudo apt-get install playonlinux samba winbind
//ham xoa tat tan tat | |
function delete_files($target) { | |
if(is_dir($target)){ | |
$files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned | |
foreach( $files as $file ) | |
{ | |
delete_files( $file ); | |
} | |
//get URL cua file hien tai; | |
$baseUrl = $_SERVER['PHP_SELF']; | |
//kiem tra thong tin request den | |
if (isset($_POST['getMember']) && $_POST['getMember'] == 'view') | |
{ | |
//wating 1s truoc khi thuc thi | |
sleep(1); | |
//tao mang member |
$(document).ready(function(){ | |
// Gắn sự kiện onclick vào #viewbtn | |
$('#viewbtn').click(function() { | |
$('#loading').html('Loading...'); | |
var strURL = $('#base_url').val(); | |
$.ajax({ | |
url: strURL, | |
type: 'POST', | |
cache: false, | |
data: 'getMember=view', |
# export mysql database into shapefile | |
ogr2ogr out_shapes MYSQL:gis,user=root,password=password | |
# import shapefile into mysql | |
ogr2ogr -f MySQL MySQL:database_name,user=root,password=password my_shapefile.shp -nln table_name -a_srs EPSG:4326 -update -overwrite -lco engine=MYISAM | |
# reproject spatial reference from WGS 84 UTM 48S to Geographic Lattitide/Longitude Coordinate System | |
ogr2ogr -f "ESRI Shapefile" target_file.shp source_file.shp -s_srs EPSG:32748 -t_srs EPSG:4326 |
/* KILL ALL EXISTING CONNECTION FROM ORIGINAL DB (sourcedb)*/ | |
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity | |
WHERE pg_stat_activity.datname = 'SOURCE_DB' AND pid <> pg_backend_pid(); | |
/* CLONE DATABASE TO NEW ONE(TARGET_DB) */ | |
CREATE DATABASE TARGET_DB WITH TEMPLATE SOURCE_DB OWNER USER_DB; | |
--https://stackoverflow.com/questions/876522/creating-a-copy-of-a-database-in-postgresql |
SELECT hientrang_cong.name, | |
replace(replace(replace((''::text || box2d(st_transform(hientrang_cong.geom, 4326))), 'BOX('::text, ''::text), ')'::text, ''::text), ' '::text, ','::text) AS bbox | |
FROM hientrang_cong | |
UNION ALL | |
SELECT hientrang_dap.name, | |
replace(replace(replace((''::text || box2d(st_transform(hientrang_dap.geom, 4326))), 'BOX('::text, ''::text), ')'::text, ''::text), ' '::text, ','::text) AS bbox | |
FROM hientrang_dap | |
UNION ALL | |
SELECT hientrang_debao.name, | |
replace(replace(replace((''::text || box2d(st_transform(hientrang_debao.geom, 4326))), 'BOX('::text, ''::text), ')'::text, ''::text), ' '::text, ','::text) AS bbox |
<iframe width="1263" height="695" src="https://www.youtube.com/embed/-SFcIUEvNOQ?rel=0&autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> |
ogr2ogr -overwrite -f MSSQLSpatial "MSSQL:server=.\MSSQLSERVER2008;database=geodb;trusted_connection=yes" "rivers.tab"
ogrinfo -al "MSSQL:server=.\MSSQLSERVER2008;database=geodb;tables=rivers;trusted_connection=yes"