Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geogig-dev] A problem with commit



On Fri, Nov 18, 2016 at 12:50 PM, Erik Merkle <emerkle@xxxxxxxxxxxxxxxx> wrote:
Jorge,

When the output shows "2138 features tree built...", the number is how many RevTree objects were created to efficiently hold all the features. It's not the number of features imported. It should probably say "2138 feature trees built...".
not quite. It _it_ how many features are contained in the "feature tree" (aka, layer). I'm guessing "street_code", the attribute used as argument for --fid-attrib, is not unique instead?
 

The next part shows "Counting unstaged elements... 2139". This number is one more, I believe, because it also includes the root tree.
Not the "root tree", but the "feature tree" (the root tree child tree that represents the layer)
 
This number is the difference between the feature tree count before the add (no trees since it was empty) and the feature tree count after the add (2138 plus the root, so 2139).

​The reason you have to do a commit with the "calles"​ path is because you gave the "calles" path on the geogig add command. If you want to add everything and commit everything, you should do this:

actually it should have worked without indicating the path to commit to the commit command.
Which geogig version are you using (can you provide the output of geogig --version)

I just tried the latest from dev and it works as expected (i.e. geogig shp import roads.shp; geogig add roads; geogig commit ...)
 
geogig shp import --fid-attrib street_code /tmp/calles.shp
geogig add
geogig commit -m "initial commit"

​That should work as you expect.​ Notice the add command has no path specified.

​Hope that helps,​


Erik Merkle
Software Engineer | Boundless

On Fri, Nov 18, 2016 at 3:57 AM, Jorge Infante <joluinfante@xxxxxxxxx> wrote:
More information:

I did:
ogrinfo /tmp/calles.shp calles | grep OGRFeature | wc -l
24071

I have 24071 elements/records.

geogig say me, in the import:
 24.071 features inserted in 2,490 s 
  Building final tree... 
  2.138 features tree built in 71,45 ms 

What is the difference between my records and the "2138" features?
Then, the import say me:

Counting unstaged elements...2139 
  Staging changes... 

2139 features. And the "my original records"?

Finally, the commit say me:

Nothing to commit after.

I did check this message is in CommitOp.java:

if (!allowEmpty && !amend) {
               throw new NothingToCommitException("Nothing to commit after " + currHeadCommit
Id);
           }

I did check the code, and the help on commit, and see the solution is:

geogig commit -m "carga inicial" calles
100%
[1c8b01be4d1d24667868caf87531ac6388486cdb] carga
Committed, counting objects...2138 features added, 0 changed, 0 deleted.

Where "calles" is my path filter.

This is the method to do the commit?


2016-11-17 19:16 GMT-03:00 Jorge Infante <joluinfante@xxxxxxxxx>:
Hi.
I did this steps:

geogig init 
  Initialized empty Geogig repository in /home/jinfante/repo/.geogig

geogig config --global user.name jinfant0
geogig config --global user.email joluinfante@xxxxxxxxx

geogig shp import --fid-attrib street_code /tmp/calles.shp
  Importing from shapefile /tmp/calles.shp
  0%
  Importing calles           (1/1)...  
  22.345
  24.071 features inserted in 2,490 s
  Building final tree...
  2.138 features tree built in 71,45 ms
  100%
  /tmp/calles.shp imported successfully.

geogig add calles 
  Counting unstaged elements...2139
  Staging changes...
  0%
  Building final tree calles
  Done.
  100%
  2.138 features and 1 trees staged for commit
  0 features and 0 trees not staged for commit
  # On branch master
  # Changes to be committed:
  #   (use "geogig reset HEAD <path/to/fid>..." to unstage)
  #
  #      added  calles
  #      added  calles/26550
  #      added  calles/79750
  #      added  calles/64150

geogig commit -m "initial commit"

  Nothing to commit after 0000000000000000000000000000000000000000

geogig status | head 
  # On branch master
  # Changes to be committed:
  #   (use "geogig reset HEAD <path/to/fid>..." to unstage)
  #
  #      added  calles
  #      added  calles/26550
  #      added  calles/79750
  #      added  calles/64150
  #      added  calles/60800
  #      added  calles/63850

commit is not working.
any ideas?


TIA
jorge infante
rosario - santa fe - argentina



_______________________________________________
geogig-dev mailing list
geogig-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geogig-dev


_______________________________________________
geogig-dev mailing list
geogig-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geogig-dev



--

Gabriel Roldán
Software Developer | Boundless
groldan@xxxxxxxxxxxxxxxx
@boundlessgeo



Back to the top