From 5569cf58ca19cc01e567b1c9933d510a302bfccd Mon Sep 17 00:00:00 2001 From: Manuel Retamozo Date: Tue, 12 Mar 2024 18:06:38 -0300 Subject: [PATCH] fix ogr2ogr linux --- app/Model/Archivo.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/app/Model/Archivo.php b/app/Model/Archivo.php index a9f9a587..6dcf2658 100644 --- a/app/Model/Archivo.php +++ b/app/Model/Archivo.php @@ -369,22 +369,9 @@ public function procesarGeomSHP($capa = 'arc') { MyDB::createSchema('_'.$this->tabla); flash('Procesando Geom desde Shape '.$capa.'...')->warning(); $mensajes = ''; - $path_ogr2ogr = "c:\OSGeo4W64\bin\ogr2ogr.exe"; + $path_ogr2ogr = "/usr/bin/ogr2ogr"; $processOGR2OGR = Process::fromShellCommandline( - '( !ogr2ogr! -f - "PostgreSQL" PG:"dbname=!db! host=!host! user=!user! port=!port! - active_schema=e!esquema! password=!pass!" --config PG_USE_COPY YES - -lco OVERWRITE=YES --config OGR_TRUNCATE YES -dsco - PRELUDE_STATEMENTS="SET client_encoding TO latin1;CREATE SCHEMA - IF NOT EXISTS e!esquema!;" -dsco active_schema=e!esquema! -lco - PRECISION=NO -lco SCHEMA=e!esquema! - -nln !capa! - -skipfailures - -overwrite !file! )' - ); - /*$path_ogr2ogr = "/usr/bin/ogr2ogr"; - $processOGR2OGR = Process::fromShellCommandline( - '( c:\OSGeo4W64\bin\ogr2ogr.exe -f \ + '( $ogr2ogr -f \ "PostgreSQL" PG:"dbname=$db host=$host user=$user port=$port \ active_schema=e$esquema password=$pass" --config PG_USE_COPY YES \ -lco OVERWRITE=YES --config OGR_TRUNCATE YES -dsco \ @@ -394,7 +381,7 @@ public function procesarGeomSHP($capa = 'arc') { -nln $capa \ -skipfailures \ -overwrite $file )' - );*/ + ); $processOGR2OGR->setTimeout(1800); //Cargo etiquetas