201307171149 - Re: Some doubts [GSoC - 2013]

Hi sir,

I have some small doubts about the documentation you provided
recently.

1. I observed the patch you sent. I think the reason for checking if it
is an instance of FLyrVect is to load the layer as is if it is Raster
layer else load it with Layer class. If so, Why do we load a vector layer
with Layer class and not a raster layer? Correct me if i understood the
patch wrongly.
2. I think the __init__ method of RasterLayerExtension is incomplete.
What should go into it?
3. In the createNewBuffer method of RasterLayerExtensions while
creating params you used a method 'getBufferFactory' for RasterManager
Instance. But there is no such method for RasterManager.
4. In prepareBuffer method of RasterLayerExtensions class, while
creating kernel in the last, we have several lines of code. I didn't get
exactly what it's purpose is.
5. What do you exactly mean by injecting new method to FLyrRaster
Class.? Does it just mean adding new methods to this class? If
so, why are
we adding them to FLyrRaster class?
6. I understood the methodology of the walk, filter methods. But what
do you exactly mean by Filter kernel, operation kernel, walk kernel?

I understood the entire code you provided. I was really worried about the
way you organized the code. Some pieces i get this doubt of why it is
placed here? why not in the classes itself etc (getBandCount,getWidth etc
are outside the classes). But i think i will get a hold of it once i start
testing the code.

Does my work now is to make the code work with appropriate methods
provided and a user should be able to import the file we provided?

Note: Could you provide some detailed information about *Store, Buffer and
Query?* I went through the documentation but couldn't get much of it. Also,
How should i plan to continue with the documentation. ? Should i start
working on the documentation?



Thank You,
Sandeep Kumar,
MS by Research,
Lab for Spatial Informatics,
IIIT-Hyderabad.

201307171149 - Re: Re: Some doubts [GSoC - 2013]

El 17/07/13 11:49, sandeep kumar escribió:

> Hi sir,
> 
>       I have some small doubts about the documentation you provided
> recently.
> 
>    1. I observed the patch you sent. I think the reason for checking if it
>       is an instance of FLyrVect  is to load the layer as is if it is Raster
>       layer else load it with Layer class. If so, Why do we load a vector layer
>       with Layer class and not a raster layer? Correct me if i understood the
>       patch wrongly.

Holas.

Cuando abordamos la implementacion del API de scripting para acceso vectorial, vimos que lo mas facil podia ser tener un recubrimiento para las clases java en jython añadiendoles a estas los metodos que nos podian hacer falta.

El problema es que no podemos extender de las clases java, ya que los objetos los crea la parte java y nunca se crearian los objetos jython.

Esto nos planteo algun problema ya que cada vez que tenemos que pasarle a una funcion java un objeto recuvierto en jython el usuario debe sere consciente que ha de hacer algo especial y no puede pasarlo directamente.

Despues de aquello hemos aprendido algo mas sobre jython. Para python, una clase es como cualquier otro objeto. Puedes coger el objeto clase y añadirle nuevos metodos y atributos al vuelo. Jython, no es tan flexible, pero si que nos permite añadirle metodos a la clase.

Imagina la clase String de java y que queremos añadirle un nuevo metodo "hello".

$ jython
Jython 2.2.1 on java1.7.0_21
Type "copyright", "credits" or "license" for more information.
>>> from java.lang import String
>>> 
>>> s=String("this is a test")
>>> s.hello()
Traceback (innermost last):
  File "<console>", line 1, in ?
AttributeError: hello
>>> def hello(self):
...   return "Hello '" + self.toString() + "'"
... 
>>> String.hello = hello
>>> s.hello()
"Hello 'this is a test'"
>>> 

Como ves, es simple añadir metodos a una clase java. La clase sigue siendo la de antes. Si tenemos una instancia de String podemos pasarsela a cualquier metodo java que reciva un String.

Para inyectar el nuevo metodo solo hemos tenido que crear una funcion "hello", que recibe como primer parametro la instancia del String ("self"), y luego asignarle esa funcion directamente a la clase String.

Cuando tengamos tiempo pasaremos la implementacion de la parte de script vectorial al nuevo formato. Injectar metodos a las clases java en lugar de recubrirlas.

En lo que estas haciendo, directamente prefiero optar por la inyeccion de metodos, por eso no es exactamente igual a lo que hay en vectorial.

>       2. I think the __init__ method of RasterLayerExtension is incomplete.
>       What should go into it?

El metodo __init__ es el constructor de la clase. Simplemente inicializa los atributos de esta.

def __init__(self, store=None):
  self.store = store
  self.buffer = None
  self.query = None
  self.values = None
  self.kernel = None
  self.setElem = None
  self.getElem = None
>       3. In the createNewBuffer method of RasterLayerExtensions while
>       creating params you used a method 'getBufferFactory'  for RasterManager
>       Instance. But there is no such method for RasterManager.

Me temo que ahora mismo no puedo mirar esto... en cuanto pueda le hecho un vistazo.

>       4. In prepareBuffer method of RasterLayerExtensions class, while
>       creating kernel in the last, we have several lines of code. I didn't get
>       exactly what it's purpose is.

Cada vez que se itera por el raster se precisa una tupla para los valores de las distintas bandas de un punto, o para la matriz de 3x3 de estos valores si se usan los metodos de "kernel". Como estamos hablando de miles (30.000+) puntos habia pensado crearlas una sola vez en la creacion del buffer en lugar de crear una para cada punto.

Oh!. hay un error en el codigo, me he dejado un "]". Deberia decir:

self.kernel = [[self.values] * 3 ] * 3
$ jython
Jython 2.2.1 on java1.7.0_21
Type "copyright", "credits" or "license" for more information.
>>> bandcount=3
>>> values = [0]*bandcount
>>> values
[0, 0, 0]
>>> kernel=[[values]*3]*3
>>> kernel
[[[0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]
>>> 
>       5. What do you exactly mean by injecting new method to FLyrRaster
>       Class.? Does it just mean adding new methods to this class? If
> so, why are
>       we adding them to FLyrRaster class?

Mas arriva he comentado ya sobre la inyeccion de metodos.

>       6. I understood the methodology of the walk, filter methods. But what
>       do you exactly mean by Filter kernel, operation kernel, walk kernel?

Los metodos '*'Kernel, se comportan de forma similar a sus analogos. Es bastante corriente a la hora de manipular un raster, que en lugar de tomar como valor de entrada unicamente el valor de un punto, tomemos los valores de ese punto y los de alrededor. Para poder trabajar con algoritmos que precisan esto es para lo que he introducido esos metodos.

> 
>   I understood the entire code you provided. I was really worried about the
> way you organized the code. Some pieces i get this doubt of why it is
> placed here? why not in the classes itself etc (getBandCount,getWidth etc
> are outside the classes). But i think i will get a hold of it once i start
> testing the code.

No hay que perder de vista que lo que se pretende es adaptar una libreria de acceso a raster ya existente hecha en java para que sea facilmente usable por usuarios que quieran hacer pequeños scripts. La libreria java de acceso a raster ya esta hecha. No debemos modificarla, aunque el desarrollo de esta este dentro del core de gvSIG, desde scripting la usamos como una libreria mas de terceros. Con esto en mente, hay varias forma de hacerlo como ya he comentado mas arriba, recubriendo las clases java o injectando metodos en estas.

Otra cosa es que te llame la atencion la forma en la que desde jython se inyectan metodos en una clase. Por un lado se define la funcion que tendra la implementacion del metodo, y luego se le asigna a la clase java.

Relacionado con esto, he estado haciendo unas pruebas y acabaremos teniendo una clase jython con los metodos en lugar de estar sueltos en el modulo, pero unicamente a efectos de facilitar la generacion de documentacion.

> 
>  Does my work now is to make the code work with appropriate methods
> provided and a user should be able to import the file we provided?
> 

De momento, nos centraremos en hacer funcionar el codigo, incluyendo al final de el codigo de testing. Una vez este listo ya lo integraremos como un modulo que un usuario pueda importar.

> Note: Could you provide some detailed information about *Store, Buffer and
> Query?* I went through the documentation but couldn't get much of it. Also,
> How should i plan to continue with the documentation. ? Should i start
> working on the documentation?
> 

Recapitulemos lo que tenemos y lo que habria que hacer.

Tenemos esbozado un API para manipular raster con aproximadamente una docena de metodos. Deberiamos tener claro que ha de hacer cada uno de ellos, sus datos de entrada y lo que generan. Con esto claro tendremos que:

Respecto a la generacion de documentacion tambien hemos tenido problemas con lo que hay ahora mismo para la parte de scripting vectorial. Antes se creo por un lado el codigo y por otro la documentacion. El codigo tenia pytondocs pero no teniamos ninguna herramienta que fuese capaz de extraerlos y generar documentacion aceptable. No es practico mantener la documentacion separada del codigo, asi que ahora probaremos otra cosa.

He hecho unas pruebas este fin de semana y creo que lo mejor sera utilizar doxygen para generar y mantener la documentacion. Usa una variante de pythondocs (similares a los javadocs).

Habra que adaptar ligeramente el codigo para que se generen correctamente la documentacion.

Crearemos una clase LayerRaster que usaremos "unicamente" como contenedor de las funciones a usar para inyectar en FLyrRaster y asi poder estructurar la documentacion de forma adecuada. Declararemos los metodos de la clase como estaticos ya que para inyectarlos en la clase java no pueden ser metodos de una clase jython.

De momento, rellena los pythondocs para doxygen adecuadamente y no te preocupes por generar la documentacion en formato HTML.

Incluyo aqui la parte de codigo con los pythondocs de doxygen. Seria algo asi

...

#--------------------------------------------------------------
# This code will go to the module gvsig_raster.py 
# Now is here to debug more easily
# Begin module gvsig_raster

##
#
# This module add raster support to the gvSIG scripting module.
#
# TODO: Add here the documentation you need
#

from org.gvsig.fmap.dal.coverage import RasterLocator
from org.gvsig.fmap.dal import DALLocator
from org.gvsig.fmap.dal.coverage.dataset import Buffer, BufferParam
from org.gvsig.raster.fmap.layers import FLyrRaster
from java.lang import Byte, Short, Integer, Float, Double

from os.path import splitext

##
#
#  Load a raster file in a layer
#
def loadRasterLayer(rasterfile ,mode="r"):
  if not isinstance(rasterfile, File):
    rasterfile = File(rasterfile)

  name, ext = splitext(rasterfile.getName())[0]
  
  # Get the manager to use
  dalManager = DALLocator.getDataManager()

  if ext.lower() == ".ecw" or ext.lower() == ".jp2" :
    # FIXME
    pass
  elif ext.lower() == ".mrsid":
    # FIXME
    pass
  else:
    # Create the parameters to open the raster store based in GDAL
    params = dalManager.createStoreParameters("Gdal Store")
    params.setFile()

  # Create the raster store "maven-doxygen-plugin"
  dataStore = dalManager.createStore(params)

  # Create a raster layer based in this raster store
  layer = mapContextManager.createLayer(name, dataStore);

  return layer

## @cond FALSE

rasterLayerExtensions = dict()

class RasterLayerExtensions(object):
  """This class hold aditional properties and operations need to manage the scripting raster layer
  (query, buffer, values....)
  """
  def __init__(self, store=None):
    self.store = store
    self.buffer = None
    self.query = None
    self.values = None
    self.kernel = None
    self.setElem = None
    self.getElem = None

  def prepareQuery(self):
    ## See RasterManager in javadocs for more info
    self.query = RasterLocator.getManager().createQuery();
    ## See RasterQuery in javadocs for more info
    self.query.setAllDrawableBands()
    self.query.setAreaOfInterest()
    self.buffer = None
    self.values = None
    self.kernel = None

  def createBuffer(self):
    self.buffer = self.store.query(self.getQuery())

  def createNewBuffer(with,height,bandcount, datatype):
    if self.store != None:
      raise RuntimeException("Can't create a new buffer associated to a store")
      
    # FIXME: workaround to work with a jython bug passing byte, short and 
    # double values as parameters
    if datatype in (Buffer.TYPE_BYTE, Buffer.TYPE_SHORT, Buffer.TYPE_INT):
      datatype = Buffer.TYPE_INT
    else:
      Buffer.TYPE_FLOAT
    # End workaround
    
    params = RasterLocator.getManager().getBufferFactory().createBufferParams(
      width, 
      height,
      bandcount,
      datatype, 
      BufferParam.CACHED
    )
    self.buffer = RasterLocator.getManager().getBufferFactory().createBuffer(params)
    self.prepareBuffer()
        
  def prepareBuffer(self):
    def setElemByte(buffer, line, col, band, data):
      buffer.setElem(line, col, band, Byte(data).byteValue())

    def setElemShort(buffer, line, col, band, data):
      buffer.setElem(line, col, band, Short(data).shortValue())
    
    def setElemInt(buffer, line, col, band, data):
      buffer.setElem(line, col, band, Integer(data).intValue())
    
    def setElemFloat(buffer, line, col, band, data):
      buffer.setElem(line, col, band, Float(data).floatValue())
    
    def setElemDouble(buffer, line, col, band, data):
      buffer.setElem(line, col, band, Double(data).doubleValue())
      
    t = buffer.getDataType()
    if t == Buffer.TYPE_BYTE:
      this.getElem = this.buffer.getElemByte
      this.setElem = setElemByte
    elif t == Buffer.TYPE__SHORT or t == Buffer.TYPE__USHORT:
      this.getElem = this.buffer.getElemShort
      this.setElem = setElemShort
    elif t == Buffer.TYPE__INT:
      this.getElem = this.buffer.getElemInt
      this.setElem = setElemInt
    elif t == Buffer.TYPE__FLOAT:
      this.getElem = this.buffer.getElemFloat
      this.setElem = setElemFloat
    elif t == Buffer.TYPE__DOUBLE:
      this.getElem = this.buffer.getElemDouble
      this.setElem = setElemDouble
    self.values = [0] * this.buffer.getBandCount()
    self.kernel = [[self.values] * 3 ] * 3

  def getQuery(self):
    if self.query == None:
      self.prepareQuery()
    return self.query
      
  def getBuffer(self, store):
    if self.buffer == None:
      self.createBuffer()
      self.prepareBuffer()
    return self.buffer

  def getValue(self, band, row, column):
    if self.getElem == None:
      self.createBuffer()
      self.prepareBuffer()
    return self.getElem(row,column,band)

  def getBandValues(row, column):
    if self.getElem == None:
      self.createBuffer()
      self.prepareBuffer()
    for b in xrange(self.buffer.getBancCount()):
      self.values[b] = self.getElem(row, column, b)
    return self.values

  def setBandValues(row,column,values):
    for b in xrange(self.buffer.getBancCount()):
      self.setElem(self.buffer, row, column, b, values[b])
    
  def saveBuffer(filename):
    manager = DALLocator.getDataManager()
    eparams = manager.createServerExplorerParameters("FilesystemExplorer")
    eparams.setDynValue("initialpath", "/tmp")
    serverExplorer = manager.openServerExplorer(eparams.getExplorerName(), eparams)
  
    sparams = (NewRasterStoreParameters)serverExplorer.getAddParameters("Gdal Store")
    sparams.setFileName(filename)
    sparams.setBuffer(buffer)
  
    serverExplorer.add("Gdal Store", sparams, True)
## @endcond
  

##
#
# Represents a raster layer.
#
class RasterLayer(FLyrRaster):

  TYPE_BYTE =  Buffer.TYPE_BYTE
  TYPE_SHORT = Buffer.TYPE_SHORT
  TYPE_INT = Buffer.TYPE_INT
  TYPE_FLOAT = Buffer.TYPE_FLOAT
  TYPE_DOUBLE = Buffer.TYPE_DOUBLE
  
  @staticmethod  
  ## @cond FALSE
  def getExtensions(self):
    """This a internal method,a don't use it.
    """
    global rasterLayerExtensions
    extensions = rasterLayerExtensions.get(self.hashCode(),None)
    if extensions == None :
      extensions = RasterLayerExtensions(self.getDataStore())
      rasterLayerExtensions[self.hashCode()] = extensions
    return extensions
  ## @endcond
        
  @staticmethod 
  ##
  #
  # Return the number of bands of the raster
  # 
  # @return the number of band of the raster
  #
  def getBandsCount(self):
    return self.getDataStore().getBandCount()

  @staticmethod  
  ##
  #
  # Return the width in points of the raster
  # 
  # @return the width of the raster
  # 
  def getWidth(self):
    return self.getDataStore().getWidth()
    
  @staticmethod  
  ##
  #
  # Return the height in points of the raster
  # 
  # @return the height of the raster
  # 
  def getHeight(self):
    return self.getDataStore().getHeight()
    
  @staticmethod  
  ##
  #
  # Return the data type of the raster.
  # 
  #  FIXME: Add the documentation about of data types
  #
  # @return FIXME
  #
  def getDataType(self):
    return self.getDataStore().getDataType()

  @staticmethod  
  ##
  # 
  # Return the value of a point of a band for a row/column of 
  # the raster.
  # 
  # This method use with care, it has a strong overhead. Use instead
  # the method "walk" to go over the raster.
  #
  # @param band band from to retrieve the value 
  # @param row FIXME
  # @param column FIXME
  #
  # @return FIXME
  #
  def getData(self, band, row, column):
    return self.getExtensions().getValue(band, row, column)

  @staticmethod  
  ##
  #
  # Go over the raster and for each point call to the funcion
  # "operation" and pass as argument a tuple with the values of
  # the point for each band.
  #
  # This method don't return any value
  #
  # @param  operation FIXME
  #
  def walk(self, operation):
    extension = self.getExtensions()
    store = self.getDataStore()
    for band in xrange(store.getBandCount()):
      for line in xrange(store.getHeight()):
        for column in xrange(store.getWidth()):
          operation(extension.getBandValues(line, column))
        
  @staticmethod  
  ##
  #
  # DOCUMENT ME !!
  # 
  def walkKernel(self, operation):
    pass

  @staticmethod  
  ##
  #
  # DOCUMENT ME !!
  # 
  def filter(self, filter, targetfilename, targetdatatype=None, targetbandcount=None):
    extension = self.getExtensions()
    store = self.getDataStore()
    targetExtension = RasterLayerExtensions()
    targetExtension.createNewBuffer(
      store.getWidth(), 
      store.getHeight(),
      targetbandcount,
      targetdatatype
    )
    for band in xrange(store.getBandCount()):
      for line in xrange(store.getHeight()):
        for column in xrange(store.getWidth()):
          values = filter(extension.getBandValues(line, column))
          targetExtension.setBandValues(line, column, values)
    targetExtension.saveBuffer(targetfilename);
      
  @staticmethod  
  ##
  #
  # DOCUMENT ME !!
  # 
  def filterKernel(self, filter, targetfilename, targettype):
    pass
    
  @staticmethod  
  ##
  #
  # DOCUMENT ME !!
  # 
  def operation(self, oepration, layer2, targetfilename, targettype):
    pass

  @staticmethod  
  ##
  #
  # DOCUMENT ME !!
  # 
  def operationKernel(self, oepration, layer2, targetfilename, targettype):
    pass

#
# Inject new methods in the class FLyrRaster
#
FLyrRaster.getExtensions = RasterLayer.getExtensions
FLyrRaster.getBandsCount = RasterLayer.getBandsCount
FLyrRaster.getWidth = RasterLayer.getWidth
FLyrRaster.getHeight = RasterLayer.getHeight
FLyrRaster.getDataType = RasterLayer.getDataType
FLyrRaster.getData = RasterLayer.getData
FLyrRaster.walk = RasterLayer.walk
FLyrRaster.walkKernel = RasterLayer.walkKernel
FLyrRaster.filter = RasterLayer.filter
FLyrRaster.filterKernel = RasterLayer.filterKernel
FLyrRaster.operation = RasterLayer.operation
FLyrRaster.operationKernel = RasterLayer.operationKernel


#
# end module gvsig_raster.py
#-------------------------------------------------------------

...

Saludos

Joaquin

> 
> 
> Thank You,
> Sandeep Kumar,
> MS by Research,
> Lab for Spatial Informatics,
> IIIT-Hyderabad.
> 

201307172311 - Re: Some doubts [GSoC - 2013]

Hi Sandeep.

El 17/07/13 23:11, sandeep kumar escribió:
> Hi Sir,
>
> In continuation with my previous mail, i forgot to ask one more doubt.
>
>
> 7. We have a method getExtensions() in RasterLayer Class? What is its
> functionality? Though, you wrote some documentation saying that it is an
> internal method, i would like to know its functionality in the code. We
> have actually used it in the filter and operation methods.
>


Jython allow to add methods to a java class but not allow to add new attributes
to the classes or instances of a java object.

We have need to add a new attribute to the FlyrRaster, an instance of
the RasterLayerExtensions. This method allows us to access to this instance.
It maintain a map with the RasterLayerExtensions instances associateds to
the FlyrRaster instance and when you invoke it, creates a new instance of
RasterLayerExtensions and store it in the map or it retrieve from the map if already
exists.

Be care with the invocation of this method, it is heavy, is a
utility method that is not part of the API.

If you have any other way to associate the instance of RasterLayerExtensions to
FlyrRaster that I think best tell it.

some advice ....
if you install the jython interpreter (not python) in the system you can do
fast tests to see if it is viable or not any construction that comes to mind
(you will not have access to any of gvSIG). For example the test to add the
method "hello" to the java String class.

Regars
Joaquin

>
> Thank You,
> Sandeep Kumar,
> MS by Research,
> Lab for Spatial Informatics,
> IIIT Hyderabad.
>

201307212144 - Re: Few Doubts [gvSIG Raster] [GSoC]

From - Mon Jul 22 09:54:57 2013
X-Account-Key: account7
X-UIDL: GmailId14002c34f5b6841c
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Delivered-To: jjdelcerro.gvsig@gmail.com
Received: by 10.194.11.100 with SMTP id p4csp58317wjb;
Sun, 21 Jul 2013 12:44:49 -0700 (PDT)
X-Received: by 10.14.149.141 with SMTP id x13mr24538015eej.77.1374435888867;
Sun, 21 Jul 2013 12:44:48 -0700 (PDT)
Return-Path: <kumarsandeep2357@gmail.com>
Received: from mail.gvsig.org (mail.gvsig.org. [213.27.225.110])
by mx.google.com with ESMTP id 1si21964985eei.39.2013.07.21.12.44.48
for <jjdelcerro.gvsig@gmail.com>;
Sun, 21 Jul 2013 12:44:48 -0700 (PDT)
Received-SPF: neutral (google.com: 213.27.225.110 is neither permitted nor denied by domain of kumarsandeep2357@gmail.com) client-ip=213.27.225.110;
Authentication-Results: mx.google.com;
spf=neutral (google.com: 213.27.225.110 is neither permitted nor denied by domain of kumarsandeep2357@gmail.com) smtp.mail=kumarsandeep2357@gmail.com;
dkim=pass header.i=@gmail.com
Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47])
by mail.gvsig.org (Postfix) with ESMTP id E06A6508111
for <jjdelcerro@gvsig.org>; Sun, 21 Jul 2013 21:44:47 +0200 (CEST)
Received: by mail-ee0-f47.google.com with SMTP id e49so3350392eek.6
for <jjdelcerro@gvsig.org>; Sun, 21 Jul 2013 12:44:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:from:date:message-id:subject:to:cc:content-type;
bh=1KCchAnR2PWmjkKDOuB3ltkcLoLjf8v0vpDkiUgBKUk=;
b=oOJIC7NyCK4xwDAPCDLwELiT2dfE1CNV5xc3X6vO8N94CmIe/Z1WaT9BPx0Iuu5qeh
4Tngwo8BKSHP4MTSxRAhGDJo0GRQG41a02xzHFwr/E5oOuufaYZLgOyBQ6glJzYlN1pb
d8gy/jr/hQDd266zs9XYUiD0W3GPHfktoVQI514gDyDL6GwIz4+B4IDHebbX+Q6CguXN
crHWe7zM3P26fyxef8JgysrnOTvsouj8ELP8593wGCx8Yc9mmbWiFuQTUryVh59FxvAi
0eVfEWVajIe+wse+pUlnn3rPD+coEzhnsuLOuAZypw5LvhKiq5GS3gKEWIinnMqGfWi3
aYJw==
X-Received: by 10.15.95.4 with SMTP id bc4mr24178397eeb.40.1374435887444; Sun,
21 Jul 2013 12:44:47 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.30.130 with HTTP; Sun, 21 Jul 2013 12:44:27 -0700 (PDT)
From: sandeep kumar <kumarsandeep2357@gmail.com>
Date: Mon, 22 Jul 2013 01:14:27 +0530
Message-ID: <CAKxdoxk-dFpHmKdyWms_cL+j4nN2icuc6-BsjjgSCj8+_t0M5g@mail.gmail.com>
Subject: Re: Few Doubts [gvSIG Raster] [GSoC]
To: Nacho Brodin <ibrodin@prodevelop.es>
Cc: Joaquin del Cerro Murciano <jjdelcerro@gvsig.org>
Content-Type: multipart/alternative; boundary=089e01681d0cd6997804e20aca61

--089e01681d0cd6997804e20aca61
Content-Type: text/plain; charset=ISO-8859-1

Hi Sir,

I am stuck with the implementation of the API for raster library.

1. We tried to import BufferParam from
org.gvsig.fmap.dal.coverage.dataset. But it is showing that there is no
such Class. Also, we are using Buffer class from the same package which is
deprecated. Could you kindly provide an alternative for this situation?
2. While creating a new Buffer we are using
"RasterLocater.getManager().getBufferFactory().createBufferParams(..)" as
used in the core gvsig code. But it is giving an AttributeError saying
"org.gvsig.raster.impl.DefaultRasterManager has no attribute
getBufferFactory()" . I think this might be due to the missing import of
BufferParam.

Sandeep Kumar,
MS by Research,
Lab for Spatial Informatics,
IIIT Hyderabad.