Skip to content

Commit

Permalink
adaptation for gdal 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
snamber committed Mar 31, 2016
1 parent a321c8d commit 04ec609
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ogr.go
Expand Up @@ -1249,7 +1249,7 @@ func (feature Feature) FID() int {

// Set feature identifier
func (feature Feature) SetFID(fid int) error {
return C.OGR_F_SetFID(feature.cval, C.long(fid)).Err()
return C.OGR_F_SetFID(feature.cval, C.GIntBig(fid)).Err()
}

// Unimplemented: DumpReadable
Expand Down Expand Up @@ -1340,12 +1340,12 @@ func (layer Layer) NextFeature() Feature {

// Move read cursor to the provided index
func (layer Layer) SetNextByIndex(index int) error {
return C.OGR_L_SetNextByIndex(layer.cval, C.long(index)).Err()
return C.OGR_L_SetNextByIndex(layer.cval, C.GIntBig(index)).Err()
}

// Fetch a feature by its index
func (layer Layer) Feature(index int) Feature {
feature := C.OGR_L_GetFeature(layer.cval, C.long(index))
feature := C.OGR_L_GetFeature(layer.cval, C.GIntBig(index))
return Feature{feature}
}

Expand All @@ -1361,7 +1361,7 @@ func (layer Layer) Create(feature Feature) error {

// Delete indicated feature from layer
func (layer Layer) Delete(index int) error {
return C.OGR_L_DeleteFeature(layer.cval, C.long(index)).Err()
return C.OGR_L_DeleteFeature(layer.cval, C.GIntBig(index)).Err()
}

// Fetch the schema information for this layer
Expand Down

0 comments on commit 04ec609

Please sign in to comment.