Skip to content

Commit

Permalink
fix ogr2ogr linux
Browse files Browse the repository at this point in the history
  • Loading branch information
manuretaindec committed Mar 12, 2024
1 parent 7a3554a commit 5569cf5
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions app/Model/Archivo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -394,7 +381,7 @@ public function procesarGeomSHP($capa = 'arc') {
-nln $capa \
-skipfailures \
-overwrite $file )'
);*/
);
$processOGR2OGR->setTimeout(1800);

//Cargo etiquetas
Expand Down

0 comments on commit 5569cf5

Please sign in to comment.