Re: [JGrass-utenti] SourceFile

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [JGrass-utenti] SourceFile

Andrea Antonello
Hi Matteo,

> come faccio ad aprire il source file dei comandi di JGrass per guardarli e/o
> modificarli ?
> In piu`, qualcuno sa dirmi il valore del parametro \alpha usato
> nell`espressione \alpha (Nabla^n z) sqr(A) per estrarre la rete (II metodo)
> ?

this is a development list question, so if we want to discuss on this,
we have to move to: [hidden email]
and write English (I know that is not a problem for you). So please if
you have further questions subscribe to that one.

We have setup a guide that introduces to JGrass development at the
following page:
http://jgrass.wiki.software.bz.it/jgrass/Setup_Development_Environment

The part that deals more with the JGrass code checkout is the following:

http://jgrass.wiki.software.bz.it/jgrass/Setup_Development_Environment#head-002cda5937b15bb0a68faa7f601067ce293e43c3


If instead you are only interested in doublechecking or validating an
algorithm, the web svn browser could be of help for you.
For example this link leads to the folder inside which all horton modules are:

https://svn.dev.cocos.bz//svnroot/jgrass/jgrass3.0/branches/jgrass4udig1.1.x/trunk/eu.hydrologis.jgrass.models/src/eu/hydrologis/jgrass/models/h/

every folder there contains the source code for the named module.

Ciao
Andrea









> Grazie,
> M.
> _______________________________________________
> JGrass-utenti mailing list
> [hidden email]
> https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-utenti
>
>
_______________________________________________
JGrass-devel mailing list
[hidden email]
https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-devel
Reply | Threaded
Open this post in threaded view
|

ExtractNetwork-TangentialStress

Matteo Convertino IMAGE Dept.
Does someone know what are the values of the parameters implemented  
for the tangential stress in the II mode of ``extract network''?
I mean, \alpha that is the coefficient and n for the gradient \Nabla z ?

PS: this link does not work anymore
> https://svn.dev.cocos.bz//svnroot/jgrass/jgrass3.0/branches/jgrass4udig1.1.x/trunk/eu.hydrologis.jgrass.models/src/eu/hydrologis/jgrass/models/h/

where can I find the sources of JGrass?

Thanks,

Matteo

On Mar 10, 2009, at 10:24 AM, andrea antonello wrote:

> Hi Matteo,
>
>> come faccio ad aprire il source file dei comandi di JGrass per  
>> guardarli e/o
>> modificarli ?
>> In piu`, qualcuno sa dirmi il valore del parametro \alpha usato
>> nell`espressione \alpha (Nabla^n z) sqr(A) per estrarre la rete (II  
>> metodo)
>> ?
>
> this is a development list question, so if we want to discuss on this,
> we have to move to: [hidden email]
> and write English (I know that is not a problem for you). So please if
> you have further questions subscribe to that one.
>
> We have setup a guide that introduces to JGrass development at the
> following page:
> http://jgrass.wiki.software.bz.it/jgrass/Setup_Development_Environment
>
> The part that deals more with the JGrass code checkout is the  
> following:
>
> http://jgrass.wiki.software.bz.it/jgrass/Setup_Development_Environment#head-002cda5937b15bb0a68faa7f601067ce293e43c3
>
>
> If instead you are only interested in doublechecking or validating an
> algorithm, the web svn browser could be of help for you.
> For example this link leads to the folder inside which all horton  
> modules are:
>
> https://svn.dev.cocos.bz//svnroot/jgrass/jgrass3.0/branches/jgrass4udig1.1.x/trunk/eu.hydrologis.jgrass.models/src/eu/hydrologis/jgrass/models/h/
>
> every folder there contains the source code for the named module.
>
> Ciao
> Andrea
>
>
>
>
>
>
>
>
>
>> Grazie,
>> M.
>> _______________________________________________
>> JGrass-utenti mailing list
>> [hidden email]
>> https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-utenti
>>
>>
> _______________________________________________
> JGrass-utenti mailing list
> [hidden email]
> https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-utenti

_______________________________________________
JGrass-devel mailing list
[hidden email]
https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-devel
Reply | Threaded
Open this post in threaded view
|

Re: ExtractNetwork-TangentialStress

Silvia Franceschi-2
Hi Matteo,
>> https://svn.dev.cocos.bz//svnroot/jgrass/jgrass3.0/branches/jgrass4udig1.1.x/trunk/eu.hydrologis.jgrass.models/src/eu/hydrologis/jgrass/models/h/
>>    
this link is the right one, but unfortunately now the server is down. We
already contacted the server administrator, we will let you know when it
works again.
There are no other links where to find JGrass source code. For this time
I will attach a selection of the h.extractnetwork algorithm to this email.

Ciao

Silvia

private boolean extractNetMode0() {

        // get rows and cols from the active region
        int rows = activeRegion.getRows();
        int cols = activeRegion.getCols();

        // create new RasterData for the network matrix
        netData = new JGrassRasterData(new double[rows][cols],
FluidConstants.fluidnovalue);

        int flw[] = new int[2];

        PrintStreamProgressMonitor pm = new PrintStreamProgressMonitor(out);
        pm.beginTask("Extracting the network...", rows);
        for( int i = 0; i < rows; i++ ) {
            for( int j = 0; j < cols; j++ ) {
               
                double tcaValue = tcaData.getValueAt(i, j);
                if (tcaValue != FluidConstants.fluidnovalue
                        && flowData.getValueAt(i, j) !=
FluidConstants.fluidnovalue) {
                    if (tcaValue >= threshold) {
                        netData.setValueAt(i, j, 2);
                        flw[0] = i;
                        flw[1] = j;
                        if (!FluidUtils.go_downstream(flw,
flowData.getValueAt(flw[0], flw[1])))
                            return false;
                        while( netData.getValueAt(flw[0], flw[1]) != 2
                                && flowData.getValueAt(flw[0], flw[1]) < 9
                                && flowData.getValueAt(flw[0], flw[1])
!= FluidConstants.fluidnovalue ) {
                            netData.setValueAt(flw[0], flw[1], 2);
                            if (!FluidUtils.go_downstream(flw,
flowData.getValueAt(flw[0], flw[1])))
                                return false;
                        }

                    } else if (flowData.getValueAt(i, j) == 10) {
                        netData.setValueAt(i, j, 2);
                    }
                } else {
                    netData.setValueAt(i, j, FluidConstants.fluidnovalue);
                }
            }
            pm.worked(1);
        }
        pm.done();
        return true;
    }

    /**
     * this method calculates the network imposing a threshold value on
the product of two
     * quantities, for example the contributing area and the slope.
     */
    private boolean extractNetMode1() {

        // get rows and cols from the active region
        int rows = activeRegion.getRows();
        int cols = activeRegion.getCols();

        // create new RasterData for the network matrix
        netData = new JGrassRasterData(new double[rows][cols],
FluidConstants.fluidnovalue);

        int flw[] = new int[2];

        out.println(Messages.getString("working") + "
h.extractnetwork"); //$NON-NLS-1$ //$NON-NLS-2$
        for( int i = 0; i < rows; i++ ) {
            for( int j = 0; j < cols; j++ ) {
                if (tcaData.getValueAt(i, j) != FluidConstants.fluidnovalue
                        && flowData.getValueAt(i, j) !=
FluidConstants.fluidnovalue) {
                    if (tcaData.getValueAt(i, j) *
slopeData.getValueAt(i, j) >= threshold) {
                        netData.setValueAt(i, j, 2);
                        flw[0] = i;
                        flw[1] = j;
                        if (!FluidUtils.go_downstream(flw,
flowData.getValueAt(flw[0], flw[1])))
                            return false;
                        while( netData.getValueAt(flw[0], flw[1]) != 2
                                && flowData.getValueAt(flw[0], flw[1]) < 9
                                && flowData.getValueAt(flw[0], flw[1])
!= FluidConstants.fluidnovalue ) {
                            netData.setValueAt(flw[0], flw[1], 2);
                            if (!FluidUtils.go_downstream(flw,
flowData.getValueAt(flw[0], flw[1])))
                                return false;
                        }
                    } else if (flowData.getValueAt(i, j) == 10) {
                        netData.setValueAt(i, j, 2);
                    }
                } else {
                    netData.setValueAt(i, j, FluidConstants.fluidnovalue);
                }
            }
        }
        return true;
    }

    /**
     * this method the network is extracted by considering only concave
points as being part of the
     * channel network.
     */
    private boolean extractNetMode2() {

        // get rows and cols from the active region
        int rows = activeRegion.getRows();
        int cols = activeRegion.getCols();

        // create new RasterData for the network matrix
        netData = new JGrassRasterData(new double[rows][cols],
FluidConstants.fluidnovalue);

        int flw[] = new int[2];

        out.println(Messages.getString("working") + "
h.extractnetwork"); //$NON-NLS-1$ //$NON-NLS-2$
        for( int i = 0; i < rows; i++ ) {
            for( int j = 0; j < cols; j++ ) {
                if (tcaData.getValueAt(i, j) != FluidConstants.fluidnovalue
                        && flowData.getValueAt(i, j) !=
FluidConstants.fluidnovalue) {
                    if (tcaData.getValueAt(i, j) >= threshold &&
classData.getValueAt(i, j) == 15.0) {
                        netData.setValueAt(i, j, 2);
                        flw[0] = i;
                        flw[1] = j;
                        if (!FluidUtils.go_downstream(flw,
flowData.getValueAt(flw[0], flw[1])))
                            return false;
                        while( netData.getValueAt(flw[0], flw[1]) != 2
                                && flowData.getValueAt(flw[0], flw[1]) < 9
                                && flowData.getValueAt(flw[0], flw[1])
!= FluidConstants.fluidnovalue ) {
                            netData.setValueAt(flw[0], flw[1], 2);
                            if (!FluidUtils.go_downstream(flw,
flowData.getValueAt(flw[0], flw[1])))
                                return false;
                        }
                    } else if (flowData.getValueAt(i, j) == 10) {
                        netData.setValueAt(i, j, 2);
                    }
                } else {
                    netData.setValueAt(i, j, FluidConstants.fluidnovalue);
                }
            }
        }
        return true;
    }
}
>
> _______________________________________________
> JGrass-devel mailing list
> [hidden email]
> https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-devel
>  
_______________________________________________
JGrass-devel mailing list
[hidden email]
https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-devel