Re: [gdal-dev] mssql import speed

2018-05-12 Thread Martin Landa
Hi,

2018-05-12 16:17 GMT+02:00 Tamas Szekeres :
> Can I get the sample data for this?

sure [1].

> Looks like more than one table is set "IDENTITY_INSERT ON" at the same time.

Steps to reproduce (tested with SQL Server 2014):

1) create new mssql db
2) C:\OSGeo4W64/apps/gdal-dev/bin/ogr2ogr -f MSSQLSpatial --config
GDAL_DRIVER_PATH C:\OSGeo4W64\apps\gdal-dev\bin\gdalplugins --config
MSSQLSPATIAL_LIST_ALL_TABLES YES %connstr% %filedb%

Thanks! Martin

[1] http://geo102.fsv.cvut.cz/~landa/tmp/Export_vse.db.7z

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] mssql import speed

2018-05-12 Thread Tamas Szekeres
Hi Martin,

Can I get the sample data for this?
Looks like more than one table is set "IDENTITY_INSERT ON" at the same time.

Best regards,

Tamas


2018-05-12 16:10 GMT+02:00 Martin Landa :

> Hi,
>
> 2018-05-12 15:51 GMT+02:00 Martin Landa :
>
> > ERROR 1: Failed to set identity insert on layer, [Microsoft][SQL Server
> Native C
> > lient 11.0][SQL Server]IDENTITY_INSERT is already ON for table
> 'kn2.dbo.par'. Ca
> > nnot perform SET operation for table 'dbo.bud'..
> > ERROR 1: Unable to write feature 1 from layer BUD.
> > ERROR 1: Terminating translation prematurely after failed
> > translation of layer BUD (use -skipfailures to skip errors)
>
> Input DB has about 50 layers, see
>
> ...
> 1: PAR (None)
> 2: BUD (None)
> 3: ZPOCHN (None)
> ...
>
> It seems that all records from PAR layer are sucessfully writen to
> target PAR table in MSSQL. Writing features from second layer (BUD)
> fails. No records written. It must be related to BCP. Martin
>
> --
> Martin Landa
> http://geo.fsv.cvut.cz/gwiki/Landa
> http://gismentors.cz/mentors/landa
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] mssql import speed

2018-05-12 Thread Martin Landa
Hi,

2018-05-12 15:51 GMT+02:00 Martin Landa :

> ERROR 1: Failed to set identity insert on layer, [Microsoft][SQL Server 
> Native C
> lient 11.0][SQL Server]IDENTITY_INSERT is already ON for table 'kn2.dbo.par'. 
> Ca
> nnot perform SET operation for table 'dbo.bud'..
> ERROR 1: Unable to write feature 1 from layer BUD.
> ERROR 1: Terminating translation prematurely after failed
> translation of layer BUD (use -skipfailures to skip errors)

Input DB has about 50 layers, see

...
1: PAR (None)
2: BUD (None)
3: ZPOCHN (None)
...

It seems that all records from PAR layer are sucessfully writen to
target PAR table in MSSQL. Writing features from second layer (BUD)
fails. No records written. It must be related to BCP. Martin

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] mssql import speed

2018-05-12 Thread Martin Landa
Hi,

2018-05-11 23:51 GMT+02:00 Martin Landa :
>>  --config GDAL_DRIVER_PATH C:\OSGeo4W64\apps\gdal-dev\bin\gdalplugins
>>
>> In progress, Ma
>
> works like a charm, from 3 hours to 3 minutes! Thanks for packaging
> gdal-mss :-) Ma

well, after solving BCP issue, I have another, on empty DB the command

C:\OSGeo4W64/apps/gdal-dev/bin/ogr2ogr -f MSSQLSpatial --config
GDAL_DRIVER_PATH C:\OSGeo4W64\apps\gdal-dev\bin\gdalplugins --config
MSSQLSPATIAL_LIST_ALL_TABLES YES %connstr% %filedb%

fails with

ERROR 1: Failed to set identity insert on layer, [Microsoft][SQL Server Native C
lient 11.0][SQL Server]IDENTITY_INSERT is already ON for table 'kn2.dbo.par'. Ca
nnot perform SET operation for table 'dbo.bud'..
ERROR 1: Unable to write feature 1 from layer BUD.
ERROR 1: Terminating translation prematurely after failed
translation of layer BUD (use -skipfailures to skip errors)

Any idea would could be wrong? Thanks! Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] [OSGeo/gdal] Fix the datadir in gdal.pc. (#609)

2018-05-12 Thread Even Rouault
On samedi 12 mai 2018 11:37:36 CEST Ari Jolma wrote:
> Even Rouault kirjoitti 12.05.2018 klo 11:18:
> > > Now I did it by creating a local clone of OSGeo/gdal and
> > > 
> > > editing/committing/pushing its release/2.3 branch.
> > 
> > You can use a single clone for all branches and uses git checkout to
> > switch branches.
> 
> I know that but the issue here was that I had my local clone from *my
> fork* as this page seems to instruct

A single clone can have several upstream sources.

For example,

$ git remote -v
origin  g...@github.com:OSGeo/gdal.git (fetch)
origin  g...@github.com:OSGeo/gdal.git (push)
rouault g...@github.com:rouault/gdal.git (fetch)
rouault g...@github.com:rouault/gdal.git (push)

If you don't have a branch that is only in origin, you do

$ git fetch origin
$ git checkout release/2.3


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] [OSGeo/gdal] Fix the datadir in gdal.pc. (#609)

2018-05-12 Thread Ari Jolma

Even Rouault kirjoitti 12.05.2018 klo 11:18:


>

> Now I did it by creating a local clone of OSGeo/gdal and

> editing/committing/pushing its release/2.3 branch.

You can use a single clone for all branches and uses git checkout to 
switch branches.




I know that but the issue here was that I had my local clone from *my 
fork* as this page seems to instruct


https://help.github.com/articles/fork-a-repo/

so my local clone did not have release/2.3.

I had also happily ignored CONTRIBUTING.md.

Thanks for the heads up.

Ari

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] [OSGeo/gdal] Fix the datadir in gdal.pc. (#609)

2018-05-12 Thread Even Rouault
Ari,

> > 
> > How do I merge a PR into another branch than master?
> 
> I made a try to -- PR #614 -- which was a mistake.

It is possible to do a PR against a non-master branch, but you need to apply 
the commit in 
that branch, and in the GitHub UI make sure the base branch it selects is that 
branch.

> 
> Now I did it by creating a local clone of OSGeo/gdal and
> editing/committing/pushing its release/2.3 branch.

You can use a single clone for all branches and uses git checkout to switch 
branches. That 
said, as someone regularly dealing with several branches, I find it more 
convenient to havea 
actually one local clone per active branch I use to avoid re-configuring/making 
each time I 
switch.

> 
> I found this
> http://www.draconianoverlord.com/2013/09/07/no-cherry-picking.html
> 
> I wonder should I have based my PR on a version that is common to master
> and release/2.3. That PR could have been merged to both of those(?).

There are different schools regarding cherry-picking vs merging. For example, 
QGIS uses 
cherry-picking too. Whereas MapServer uses merging from stable branch to master.

Cherry-picking is fine to me and that's what I use.  See notes at end of 
CONTRIBUTING.md. I 
find it to offer more control than merging.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] [OSGeo/gdal] Fix the datadir in gdal.pc. (#609)

2018-05-12 Thread Ari Jolma

Ari Jolma kirjoitti 12.05.2018 klo 10:18:

Even Rouault kirjoitti 11.05.2018 klo 23:19:


cherry-pick in release/2.3



How do I merge a PR into another branch than master?


I made a try to -- PR #614 -- which was a mistake.

Now I did it by creating a local clone of OSGeo/gdal and 
editing/committing/pushing its release/2.3 branch.


I found this 
http://www.draconianoverlord.com/2013/09/07/no-cherry-picking.html


I wonder should I have based my PR on a version that is common to master 
and release/2.3. That PR could have been merged to both of those(?).


Ari

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev