[otb-users] Fine registration

2018-08-03 Thread Gabrielle Hoelzle
I am having trouble with the fine registration function. I clipped the two 
images to the same size (as close as I could for rasters) but, I still get 
the error that they do not occupy the same physical space. Thoughts on a 
workaround. Is there a better way to prep the images before hand to make 
them more exact in physical space they occupy?

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[otb-users] Zonal stats: updating polygons of a vector file by adding fields computed from a raster

2018-08-03 Thread Jordi Inglada


Hi,

Given an image (raster) and a vector file containing polygons, I need to
compute a series of values for each polygon like the mean of a
particular band of the raster, etc. and then produce a new (or update
the) vector file with new fields. I think these are called zonal
statistics.

It looks like the LSMSVectorization application does that, but it uses a
raster segmentation instead of an input vector file. Given that my
polygons cover only a small fraction of the input raster, I don't think
than rasterizing the vector file to use this application will be
efficient. An besides, I would have to link back the attributes to the
original polygons, which is an additional step.

Is there any other way to do that with existing OTB applications? Maybe
gdal command line tools can do that? I have been looking around and it
seems that this is usually done the way LSMSVectorization does it (burn
the vector to raster, then compute using rasters only).

Do you have any advice on how to proceed if I need to write my own
application for that? I guess I will have to if I want to be able to
compute other features than mean and variance of the raster bands.

By the way, my images and vector data are huge, so streaming and
multi-threading will be needed.

I was thinking about the following approach:

1. Read in a set of polygons until a total surface is reached (so that
   we can associate that with the RAM needed for the total number of raster
   pixels to keep in memory).
2. Project the polygons onto the raster geometry and read in the pixels
3. Parallel computation of the stats (either with an OpenMP loop or a
   simple thread pool [1])
4. Write the geometries and the stats to the output file
5. Release the memory and go back to 1

Any comments on that?

Thanks.

Jordi

[1] 
https://jordiinglada.net/wp/2015/05/13/a-simple-thread-pool-to-run-parallel-prosail-simulations/

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [otb-users] Re: PolygonClassStatisticsERROR

2018-08-03 Thread Rémi
Ok, I've put it here 
.

Le vendredi 3 août 2018 14:40:54 UTC+2, Manuel Grizonnet a écrit :
>
> Feel free to create a gitlab  issue to describe the possible confusion in 
> the application documentation:
>
> https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/issues
>
> It will be written somewhere and hopefully fix in the future.
>
> Thanks,
>
> Manuel
>
> 2018-08-02 10:35 GMT+02:00 Rémi >:
>
>> Efi,
>>
>> Indeed the documentation could be quite confusing when you use the 
>> application from command line.
>> The "list" makes sense if you use the app from GUI.
>> It is a single valued list, something more like "you want to chose 
>> something in this list" kind of.
>> In GUI mode, the application updates the parameter, and display the 
>> available fields.
>> In CLI mode, you can only provide 1 single value to this list.
>>
>> Hope that helps,
>>
>> Rémi
>>
>> Le jeudi 2 août 2018 10:04:23 UTC+2, Efi a écrit :
>>>
>>> Dear Remi,
>>>
>>> Thank you for replying and the advice. Thing is, HOW do I tell the tool 
>>> what the column is. In the documentation it says that it should be a 
>>> 'List'. Do you know how this should be, for example if the column is named 
>>> 'class', I imagine that I need to create a file (.txt, .csv ..?) that 
>>> contains the field name. This is what I do not know, for now. In the 
>>> example provided in the documentation the assocaited file is 
>>> "variousVectors.sqlite", so it's an .sqlite file but still it is not 
>>> clear to me what the contents are.
>>> Link to documentation: 
>>> https://www.orfeo-toolbox.org/CookBook/Applications/app_PolygonClassStatistics.html
>>> I hope I express my question in a way that makes sense to you.
>>> Thanks again,
>>>
>>> Efi
>>>
>>> On Thu, Aug 2, 2018 at 9:51 AM, Rémi  wrote:
>>>
 Dear Efi,

 You have to tell PolygonClassStatistics what is the name of the field 
 (the column in the attribute table of your vector data) it should use. For 
 instance, "class".
 Hope that helps.

 Rémi


 Le mercredi 1 août 2018 15:51:13 UTC+2, Efi a écrit :
>
> Hello everyone,
>
> I like to run the PolygonClassStaitistics tool in OTB Monteverdi and 
> the command line and I get the following error: 
> "ERROR: ListViewParameter(01E9C173BDF0): Value id not found in the 
> list of choices"
> I suppose it has to do with the missing FIELD NAME parameter (should 
> be a List). Is there anywhere an example of how this List should be 
> structured and saved?
> In the example provided in Orfeo Cookbook (
> https://www.orfeo-toolbox.org/CookBook/Applications/app_PolygonClassStatistics.html)
>  
> the file seems to be an sqlite file 
>
> ("variousVectors.sqlite"). 
>
> How should a List file describing a polygon shapefile with 2 columns 
> in the attribute table look like in order to be read by OTB?
>
> Thank you,
> Efi
>
 -- 
 -- 
 Check the OTB FAQ at
 http://www.orfeo-toolbox.org/FAQ.html
  
 You received this message because you are subscribed to the Google
 Groups "otb-users" group.
 To post to this group, send email to otb-...@googlegroups.com
 To unsubscribe from this group, send email to
 otb-users+...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/otb-users?hl=en
 --- 
 You received this message because you are subscribed to the Google 
 Groups "otb-users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to otb-users+...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> -- 
>> Check the OTB FAQ at
>> http://www.orfeo-toolbox.org/FAQ.html
>>  
>> You received this message because you are subscribed to the Google
>> Groups "otb-users" group.
>> To post to this group, send email to otb-...@googlegroups.com 
>> 
>> To unsubscribe from this group, send email to
>> otb-users+...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/otb-users?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "otb-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to otb-users+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Manuel Grizonnet
>

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google 

Re: [otb-users] Re: PolygonClassStatisticsERROR

2018-08-03 Thread Manuel Grizonnet
Feel free to create a gitlab  issue to describe the possible confusion in
the application documentation:

https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/issues

It will be written somewhere and hopefully fix in the future.

Thanks,

Manuel

2018-08-02 10:35 GMT+02:00 Rémi :

> Efi,
>
> Indeed the documentation could be quite confusing when you use the
> application from command line.
> The "list" makes sense if you use the app from GUI.
> It is a single valued list, something more like "you want to chose
> something in this list" kind of.
> In GUI mode, the application updates the parameter, and display the
> available fields.
> In CLI mode, you can only provide 1 single value to this list.
>
> Hope that helps,
>
> Rémi
>
> Le jeudi 2 août 2018 10:04:23 UTC+2, Efi a écrit :
>>
>> Dear Remi,
>>
>> Thank you for replying and the advice. Thing is, HOW do I tell the tool
>> what the column is. In the documentation it says that it should be a
>> 'List'. Do you know how this should be, for example if the column is named
>> 'class', I imagine that I need to create a file (.txt, .csv ..?) that
>> contains the field name. This is what I do not know, for now. In the
>> example provided in the documentation the assocaited file is
>> "variousVectors.sqlite", so it's an .sqlite file but still it is not
>> clear to me what the contents are.
>> Link to documentation: https://www.orfeo-toolbox.org/
>> CookBook/Applications/app_PolygonClassStatistics.html
>> I hope I express my question in a way that makes sense to you.
>> Thanks again,
>>
>> Efi
>>
>> On Thu, Aug 2, 2018 at 9:51 AM, Rémi  wrote:
>>
>>> Dear Efi,
>>>
>>> You have to tell PolygonClassStatistics what is the name of the field
>>> (the column in the attribute table of your vector data) it should use. For
>>> instance, "class".
>>> Hope that helps.
>>>
>>> Rémi
>>>
>>>
>>> Le mercredi 1 août 2018 15:51:13 UTC+2, Efi a écrit :

 Hello everyone,

 I like to run the PolygonClassStaitistics tool in OTB Monteverdi and
 the command line and I get the following error:
 "ERROR: ListViewParameter(01E9C173BDF0): Value id not found in the
 list of choices"
 I suppose it has to do with the missing FIELD NAME parameter (should be
 a List). Is there anywhere an example of how this List should be structured
 and saved?
 In the example provided in Orfeo Cookbook (
 https://www.orfeo-toolbox.org/CookBook/Applications/app_Pol
 ygonClassStatistics.html) the file seems to be an sqlite file

 ("variousVectors.sqlite").

 How should a List file describing a polygon shapefile with 2 columns in
 the attribute table look like in order to be read by OTB?

 Thank you,
 Efi

>>> --
>>> --
>>> Check the OTB FAQ at
>>> http://www.orfeo-toolbox.org/FAQ.html
>>>
>>> You received this message because you are subscribed to the Google
>>> Groups "otb-users" group.
>>> To post to this group, send email to otb-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> otb-users+...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/otb-users?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "otb-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to otb-users+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> --
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to otb-users@googlegroups.com
> To unsubscribe from this group, send email to
> otb-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to otb-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Manuel Grizonnet

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [otb-users] Unable to build OTB (6.7) example on Ubuntu 18

2018-08-03 Thread Manuel Grizonnet
The compilation issue is now fix in the git develop branch of OTB. It
should work now. Sorry for that.

Manuel

2018-08-03 9:40 GMT+02:00 Poughon Victor :

> Hi
>
> This is a known problem in the develop branch right now. We are fixing it:
> https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/merge_requests/188
>
> In the meantime you should probably use the master branch to get the
> latest release, or the specific release you want with branch release-6.6
> for example:
>
> git checkout master
>
> Victor Poughon
>
> > -Message d'origine-
> > De : otb-users@googlegroups.com  De la part
> de ym2018
> > Envoyé : mercredi 1 août 2018 18:29
> > À : otb-users@googlegroups.com
> > Objet : [otb-users] Unable to build OTB (6.7) example on Ubuntu 18
> >
> > Hy all I've create a Ubuntu docker like so :
> >
> > FROM ubuntu:18.04
> >
> > RUN apt-get update
> > RUN apt-get install -y build-essential git cmake wget
> >
> > #Clone Sources
> > RUN mkdir ~/OTB
> > RUN cd ~/OTB && git clone
> > https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb.git
> >
> > RUN mkdir ~/OTB/build
> > RUN mkdir ~/OTB/install
> >
> > #BUILD
> > RUN cd ~/OTB/build && cmake -D CMAKE_INSTALL_PREFIX=~/OTB/install
> > ~/OTB/otb/SuperBuild -DOTB_USE_QWT=OFF -DOTB_USE_GLFW=OFF
> -DOTB_USE_GLEW=OFF -DOTB_USE_GLUT=OFF -
> > DOTB_USE_OPENGL=OFF -DOTB_USE_QT=OFF -DOTB_USE_OPENGL=OFF
> -DOTB_WRAP_PYTHON=OFF RUN cd ~/OTB/build &&
> > make
> >
> > Everything is ok!
> >
> > Despite I'm unable to build OTB_examples:
> > there is my error :
> >
> > root/OTB/install/include/OTB-6.7/otbGDALImageIO.h:119:3: error: no
> match for 'operator<<' (operand
> > types are 'std::basic_ostream' and 'const NoDataListType {aka const
> > std::vector >}')
> >
> > Is Someone know how to solve that issue ?
> >
> > thanks for attention.
> >
> >
> >
> >
> > --
> > Sent from: http://otb-users.37221.n3.nabble.com/
> >
> > --
> > --
> > Check the OTB FAQ at
> > http://www.orfeo-toolbox.org/FAQ.html
> >
> > You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> > To post to this group, send email to otb-users@googlegroups.com To
> unsubscribe from this group, send
> > email to
> > otb-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/otb-users?hl=en
> > ---
> > You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to otb-
> > users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to otb-users@googlegroups.com
> To unsubscribe from this group, send email to
> otb-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to otb-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Manuel Grizonnet

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [otb-users] Unable to build OTB (6.7) example on Ubuntu 18

2018-08-03 Thread Poughon Victor
Hi

This is a known problem in the develop branch right now. We are fixing it:
https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/merge_requests/188

In the meantime you should probably use the master branch to get the latest 
release, or the specific release you want with branch release-6.6 for example:

git checkout master

Victor Poughon

> -Message d'origine-
> De : otb-users@googlegroups.com  De la part de 
> ym2018
> Envoyé : mercredi 1 août 2018 18:29
> À : otb-users@googlegroups.com
> Objet : [otb-users] Unable to build OTB (6.7) example on Ubuntu 18
> 
> Hy all I've create a Ubuntu docker like so :
> 
> FROM ubuntu:18.04
> 
> RUN apt-get update
> RUN apt-get install -y build-essential git cmake wget
> 
> #Clone Sources
> RUN mkdir ~/OTB
> RUN cd ~/OTB && git clone
> https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb.git
> 
> RUN mkdir ~/OTB/build
> RUN mkdir ~/OTB/install
> 
> #BUILD
> RUN cd ~/OTB/build && cmake -D CMAKE_INSTALL_PREFIX=~/OTB/install
> ~/OTB/otb/SuperBuild -DOTB_USE_QWT=OFF -DOTB_USE_GLFW=OFF -DOTB_USE_GLEW=OFF 
> -DOTB_USE_GLUT=OFF -
> DOTB_USE_OPENGL=OFF -DOTB_USE_QT=OFF -DOTB_USE_OPENGL=OFF 
> -DOTB_WRAP_PYTHON=OFF RUN cd ~/OTB/build &&
> make
> 
> Everything is ok!
> 
> Despite I'm unable to build OTB_examples:
> there is my error :
> 
> root/OTB/install/include/OTB-6.7/otbGDALImageIO.h:119:3: error: no match for 
> 'operator<<' (operand
> types are 'std::basic_ostream' and 'const NoDataListType {aka const
> std::vector >}')
> 
> Is Someone know how to solve that issue ?
> 
> thanks for attention.
> 
> 
> 
> 
> --
> Sent from: http://otb-users.37221.n3.nabble.com/
> 
> --
> --
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
> 
> You received this message because you are subscribed to the Google Groups 
> "otb-users" group.
> To post to this group, send email to otb-users@googlegroups.com To 
> unsubscribe from this group, send
> email to
> otb-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to otb-
> users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[otb-users] Unable to build OTB (6.7) example on Ubuntu 18

2018-08-03 Thread ym2018
Hy all I've create a Ubuntu docker like so :

FROM ubuntu:18.04

RUN apt-get update
RUN apt-get install -y build-essential git cmake wget

#Clone Sources
RUN mkdir ~/OTB
RUN cd ~/OTB && git clone
https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb.git

RUN mkdir ~/OTB/build
RUN mkdir ~/OTB/install

#BUILD
RUN cd ~/OTB/build && cmake -D CMAKE_INSTALL_PREFIX=~/OTB/install
~/OTB/otb/SuperBuild -DOTB_USE_QWT=OFF -DOTB_USE_GLFW=OFF -DOTB_USE_GLEW=OFF
-DOTB_USE_GLUT=OFF -DOTB_USE_OPENGL=OFF -DOTB_USE_QT=OFF
-DOTB_USE_OPENGL=OFF -DOTB_WRAP_PYTHON=OFF
RUN cd ~/OTB/build && make

Everything is ok!

Despite I'm unable to build OTB_examples:
there is my error :

root/OTB/install/include/OTB-6.7/otbGDALImageIO.h:119:3: error: no match for
'operator<<' (operand types are 'std::basic_ostream' and 'const
NoDataListType {aka const std::vector >}')

Is Someone know how to solve that issue ? 

thanks for attention.




--
Sent from: http://otb-users.37221.n3.nabble.com/

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.