예제 #1
0
 def index(self, field_name):
     "Returns the index of the given field name."
     i = get_field_index(self._ptr, field_name)
     if i < 0:
         raise OGRIndexError('invalid OFT field name given: "%s"' %
                             field_name)
     return i
예제 #2
0
 def index(self, field_name):
     "Returns the index of the given field name."
     i = capi.get_field_index(self.ptr, force_bytes(field_name))
     if i < 0:
         raise OGRIndexError('invalid OFT field name given: "%s"' %
                             field_name)
     return i
예제 #3
0
 def index(self, field_name):
     "Returns the index of the given field name."
     i = capi.get_field_index(self.ptr, force_bytes(field_name))
     if i < 0:
         raise OGRIndexError(
             'invalid OFT field name given: "%s"' % field_name)
     return i
예제 #4
0
from django.contrib.gis.gdal.base import GDALBase
예제 #5
0
파일: feature.py 프로젝트: ZekriSara/pfe
 def index(self, field_name):
     "Return the index of the given field name."
     i = capi.get_field_index(self.ptr, force_bytes(field_name))
     if i < 0:
         raise IndexError("Invalid OFT field name given: %s." % field_name)
     return i
예제 #6
0
 def index(self, field_name):
     "Returns the index of the given field name."
     i = get_field_index(self._ptr, field_name)
     if i < 0: raise OGRIndexError('invalid OFT field name given: "%s"' % field_name)
     return i
예제 #7
0
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        return OGRGeomType(capi.get_fd_geom_type(self._layer._ldefn))

    # #### Feature Methods ####
    def get(self, field):
        """
<<<<<<< HEAD
        Returns the value of the field, instead of an instance of the Field
=======
        Return the value of the field, instead of an instance of the Field
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        object.  May take a string of the field name or a Field object as
        parameters.
        """
        field_name = getattr(field, 'name', field)
        return self[field_name].value

    def index(self, field_name):
<<<<<<< HEAD
        "Returns the index of the given field name."
        i = capi.get_field_index(self.ptr, force_bytes(field_name))
        if i < 0:
            raise OGRIndexError('invalid OFT field name given: "%s"' % field_name)
=======
        "Return the index of the given field name."
        i = capi.get_field_index(self.ptr, force_bytes(field_name))
        if i < 0:
            raise IndexError('Invalid OFT field name given: %s.' % field_name)
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        return i