<div dir="ltr"><div><div><div><div><div>Hi guys,<br><br></div>i'm giving the first steps in this kind of programming.<br><br></div>So the scenario is:<br><br></div>I have a lot of users that dump work shapfiles into a folder, then i need to upload this files to a database into a single table (at this time i'm testing the PostGIS).<br>
<br></div>So I read some snippets code and some tutorials and i try to do the .bat but at this time i have some errors.<br><br></div><div>Note: I put the name of user and password with dummy value :)<br></div><div><br></div>
The error that give me for the 2 test shapefiles that i try to import is:<br><br>ERROR 1: Unable to write feature 0 from layer Polygon1.<br><br>ERROR 1: Terminating translation prematurely after failed<br>translation of layer Polygon1 (use -skipfailures to skip errors)<br>
<br>ERROR 1: Unable to write feature 0 from layer Polygon2.<br><br>ERROR 1: Terminating translation prematurely after failed<br>translation of layer Polygon2 (use -skipfailures to skip errors)<br><div><br>My actual code of the .bat is:<br>
<br><br><div>@echo off<br>for %%I in (inputs_pggis\*.shp) do (<br>echo Import shapefile %%~nxI to schema temp.upload<br> Tabela PostGIS ...<br>ogr2ogr -append -update -f PostgreSQL PG:"dbname='temp_gis' user='test_user' password='test_pss'" inputs_pggis/%%~nxI -nln temp.upload<br>
)<br><br><br></div><div>Best Regards,<br></div><div>Joćo<br></div></div></div>