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

Excuse me.
I did detect the problem with the street_code, a few hours before, yesterday.
It is not unique. You are ok. I did detect it after to put a lot of "debug" in the code, to check where in the code my elements is dropped. I did detect my problem in WorkingTreeImpl.java code (name is the var to keep unique id values), and printing the value, I saw the street_code values I was missing, and, detect I have a unique value from a lot of them.
It is clear in the documentation that the value chosen as id should be unique, but obviously I was confused (streets contains the list of blocks, which are several for each street, instead of containing the list of streets).

I have only the problem of sintaxis, now. If I don't inform the name of layer (calles), I can't to complete the commit.

My apologies again

2016-11-22 18:51 GMT-03:00 Erik Merkle <emerkle@xxxxxxxxxxxxxxxx>:
I'll try to reproduce with 1.0-RC3 and report back

-Erik

On Tue, Nov 22, 2016 at 3:05 PM, Gabriel Roldan <groldan@xxxxxxxxxxxxxxxx> wrote:
That's so strange. I know "works for me" is the worst of the answers.

@Erik can you check if you observe the same behavior than Jorge with 1.0-RC3?

Jorge, can you try the latest nightly build from <http://ares.boundlessgeo.com/geogig/dev/geogig-dev-latest.zip>?

sorry but I'm not sure why commit might not be working for you

re the number of features discrepancy, can you confirm whether street_code is unique or not? given the resulting feature tree has less features than imported, and street_code is being used as the feature identifier, I'm guessing it's not. Otherwise it's a bug.

cheers,
Gabriel


On Sun, Nov 20, 2016 at 5:23 PM, Jorge Infante <joluinfante@xxxxxxxxx> wrote:
Hi, thanks to response to all.
I did change the steps, but, nothing change:

rm -rf .geogig
geogig init

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

geogig config --global user.name jinfant0
geogig config --global user.email joluinfante@xxxxxxxxx
ogrinfo /tmp/calles.shp calles | grep OGRFeature | wc -l 
24071 

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,695 s

Building final tree...

2.138 features tree built in 89,20 ms
100%
/tmp/calles.shp imported successfully.

geogig add 
Counting unstaged elements...2139
Staging changes...
100%
2.138 features and 1 trees staged for commit
0 features and 0 trees not staged for commit

geogig status
# On branch master
# Changes to be committed:
#   (use "geogig reset HEAD <path/to/fid>..." to unstage)
#
#      added  calles
#      added  calles/79750
#      added  calles/26550
#      added  calles/147
#      added  calles/38650
#      added  calles/11322 

geogig commit -m "carga inicial"
Nothing to commit after 0000000000000000000000000000000000000000 

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

geogig log
No commits to show

Then, if I don't add the "calles" argument to import and add sentences, the commit don't include records.

geogig --version
        Project Version : 1.0-RC3
             Build Time : octubre 26, 2016 at 21:06:09 ART
        Build User Name : Unknown
       Build User Email : Unknown
             Git Branch : master
          Git Commit ID : 36e66e123e9dbcf412f9c6d165705eb420cea7a1
        Git Commit Time : agosto 03, 2016 at 19:36:54 ART
 Git Commit Author Name : Gabriel Roldan
Git Commit Author Email : groldan@xxxxxxxxxxxxxxxx
     Git Commit Message : Set version to 1.0-RC3

Signed-off-by: Gabriel Roldan <groldan@xxxxxxxxxxxxxxxx>

java -version
openjdk version "1.8.0_01-Ubuntu"
OpenJDK Runtime Environment (build 1.8.0_01-Ubuntu-8u77-b03-3ubuntu1-b03)
OpenJDK Server VM (build 25.01-b03, mixed mode)


2016-11-18 14:07 GMT-03:00 Gabriel Roldan <groldan@xxxxxxxxxxxxxxxx>:


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



_______________________________________________
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



_______________________________________________
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


Back to the top